Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7677)

Unified Diff: chrome/browser/ui/webui/omnibox/omnibox_ui.cc

Issue 1457623004: Serve mojo WebUI resources from the same origin as the WebUI itself. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/webui/mojo_web_ui_controller.cc ('k') | content/browser/webui/web_ui_data_source_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/omnibox/omnibox_ui.cc
diff --git a/chrome/browser/ui/webui/omnibox/omnibox_ui.cc b/chrome/browser/ui/webui/omnibox/omnibox_ui.cc
index 532420bbaf34ac6b681ee206f93ab64b1ae5ba0b..cb02a8973b7c8c15c66931bb2515156802791294 100644
--- a/chrome/browser/ui/webui/omnibox/omnibox_ui.cc
+++ b/chrome/browser/ui/webui/omnibox/omnibox_ui.cc
@@ -14,16 +14,16 @@
OmniboxUI::OmniboxUI(content::WebUI* web_ui) : MojoWebUIController(web_ui) {
// Set up the chrome://omnibox/ source.
- content::WebUIDataSource* html_source =
+ content::WebUIDataSource* source =
content::WebUIDataSource::Create(chrome::kChromeUIOmniboxHost);
- html_source->AddResourcePath("omnibox.css", IDR_OMNIBOX_CSS);
- html_source->AddResourcePath("omnibox.js", IDR_OMNIBOX_JS);
- html_source->SetDefaultResource(IDR_OMNIBOX_HTML);
+ source->AddResourcePath("omnibox.css", IDR_OMNIBOX_CSS);
+ source->AddResourcePath("omnibox.js", IDR_OMNIBOX_JS);
+ source->AddResourcePath("chrome/browser/ui/webui/omnibox/omnibox.mojom",
+ IDR_OMNIBOX_MOJO_JS);
+ source->AddMojoResources();
+ source->SetDefaultResource(IDR_OMNIBOX_HTML);
- content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), html_source);
-
- AddMojoResourcePath("chrome/browser/ui/webui/omnibox/omnibox.mojom",
- IDR_OMNIBOX_MOJO_JS);
+ content::WebUIDataSource::Add(Profile::FromWebUI(web_ui), source);
}
OmniboxUI::~OmniboxUI() {}
« no previous file with comments | « chrome/browser/ui/webui/mojo_web_ui_controller.cc ('k') | content/browser/webui/web_ui_data_source_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698