code cleanup

This commit is contained in:
deepak1556 2017-01-22 20:23:42 +05:30
parent de7dcdedba
commit ddc2e0df71
8 changed files with 14 additions and 16 deletions

View file

@ -21,7 +21,7 @@ namespace atom {
namespace {
std::string PathWithoutParams(const std::string& path) {
return GURL(std::string("chrome://pdf-viewer/") + path).path().substr(1);
return GURL(PdfViewerUI::kOrigin + path).path().substr(1);
}
class BundledDataSource : public content::URLDataSource {
@ -79,7 +79,9 @@ class BundledDataSource : public content::URLDataSource {
} // namespace
const char PdfViewerUI::kOrigin[] = "chrome://pdf-viewer/";
const char PdfViewerUI::kHost[] = "pdf-viewer";
const char PdfViewerUI::kId[] = "viewId";
PdfViewerUI::PdfViewerUI(content::BrowserContext* browser_context,
content::WebUI* web_ui,

View file

@ -21,7 +21,9 @@ namespace atom {
class PdfViewerUI : public content::WebUIController,
public content::WebContentsObserver {
public:
static const char kOrigin[];
static const char kHost[];
static const char kId[];
PdfViewerUI(content::BrowserContext* browser_context,
content::WebUI* web_ui,