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

Unified Diff: content/renderer/web_ui_mojo_context_state.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: 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
Index: content/renderer/web_ui_mojo_context_state.h
diff --git a/content/renderer/web_ui_mojo_context_state.h b/content/renderer/web_ui_mojo_context_state.h
index 4aa12e5153231c4f9ead9170972564b201be5fa0..28872d4486864aaa77398da71624abff95a20079 100644
--- a/content/renderer/web_ui_mojo_context_state.h
+++ b/content/renderer/web_ui_mojo_context_state.h
@@ -62,6 +62,9 @@ class WebUIMojoContextState : public gin::ModuleRegistryObserver {
const std::string& id,
const std::vector<std::string>& dependencies) override;
+ // Returns the prefix to use for all module requests.
+ const std::string& GetModulePrefix();
+
// Frame script is executed in. Also used to download resources.
blink::WebFrame* frame_;
@@ -77,6 +80,9 @@ class WebUIMojoContextState : public gin::ModuleRegistryObserver {
// Set of modules we've fetched script from.
std::set<std::string> fetched_modules_;
+ // A cached copy of the prefix to use for all module requests.
+ std::string module_prefix_;
+
DISALLOW_COPY_AND_ASSIGN(WebUIMojoContextState);
};

Powered by Google App Engine
This is Rietveld 408576698