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

Unified Diff: content/public/browser/web_ui_data_source.h

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 | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/renderer/mojo_context_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/web_ui_data_source.h
diff --git a/content/public/browser/web_ui_data_source.h b/content/public/browser/web_ui_data_source.h
index 5e0a2deb5680a34b4aa6e91bf182c97cb49a65e1..badcb6e03aac7c628a88fa623103066cac4c070e 100644
--- a/content/public/browser/web_ui_data_source.h
+++ b/content/public/browser/web_ui_data_source.h
@@ -25,12 +25,6 @@ class WebUIDataSource {
CONTENT_EXPORT static WebUIDataSource* Create(const std::string& source_name);
- // Adds the necessary resources for mojo bindings returning the
- // WebUIDataSource that handles the resources. Callers do not own the return
- // value.
- CONTENT_EXPORT static WebUIDataSource* AddMojoDataSource(
- BrowserContext* browser_context);
-
// Adds a WebUI data source to |browser_context|.
CONTENT_EXPORT static void Add(BrowserContext* browser_context,
WebUIDataSource* source);
@@ -77,6 +71,9 @@ class WebUIDataSource {
// Allows a caller to add a filter for URL requests.
virtual void SetRequestFilter(const HandleRequestCallback& callback) = 0;
+ // Adds the necessary resources for mojo bindings.
+ virtual void AddMojoResources() = 0;
+
// The following map to methods on URLDataSource. See the documentation there.
// NOTE: it's not acceptable to call DisableContentSecurityPolicy for new
// pages, see URLDataSource::ShouldAddContentSecurityPolicy and talk to
« no previous file with comments | « content/browser/webui/web_ui_mojo_browsertest.cc ('k') | content/renderer/mojo_context_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698