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

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

Issue 1467133004: Revert of 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: 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/web_ui_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 badcb6e03aac7c628a88fa623103066cac4c070e..5e0a2deb5680a34b4aa6e91bf182c97cb49a65e1 100644
--- a/content/public/browser/web_ui_data_source.h
+++ b/content/public/browser/web_ui_data_source.h
@@ -24,6 +24,12 @@
virtual ~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,
@@ -71,9 +77,6 @@
// 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/web_ui_mojo_context_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698