diff options
author | sammc <sammc@chromium.org> | 2015-11-29 17:46:46 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-30 01:47:37 +0000 |
commit | afd813ed4b6ce7fbaef2ed9dc39802bcd5587c79 (patch) | |
tree | 4411e474c5e7e36f8269205eeee376730a04e935 /content/renderer/mojo_context_state.h | |
parent | a1f820202cfb28e67a53fa5aa9df318ee85d72b3 (diff) | |
download | chromium_src-afd813ed4b6ce7fbaef2ed9dc39802bcd5587c79.zip chromium_src-afd813ed4b6ce7fbaef2ed9dc39802bcd5587c79.tar.gz chromium_src-afd813ed4b6ce7fbaef2ed9dc39802bcd5587c79.tar.bz2 |
Serve mojo WebUI resources from the same origin as the WebUI itself.
Currently, mojo resources are served from chrome://mojo and each mojo
WebUI controller replaces the WebUIDataSource for that origin with one
containing the resource it needs on construction. If a WebUI page's
controller (or an equivalent one) was not the last one to be
constructed, any requests for mojo bindings for its mojo interfaces
will fail. This change fixes this problem by serving the mojo resources
from the same origin as the WebUI itself.
BUG=557540
Committed: https://crrev.com/7e10653acb8254226f9b3ca5e0233c298c2ffbc3
Cr-Commit-Position: refs/heads/master@{#361275}
Review URL: https://codereview.chromium.org/1457623004
Cr-Commit-Position: refs/heads/master@{#362078}
Diffstat (limited to 'content/renderer/mojo_context_state.h')
-rw-r--r-- | content/renderer/mojo_context_state.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/content/renderer/mojo_context_state.h b/content/renderer/mojo_context_state.h index 9611042..f6516b4 100644 --- a/content/renderer/mojo_context_state.h +++ b/content/renderer/mojo_context_state.h @@ -76,6 +76,9 @@ class MojoContextState : public gin::ModuleRegistryObserver { // Set of modules we've fetched script from. std::set<std::string> fetched_modules_; + // The prefix to use for all module requests. + const std::string module_prefix_; + DISALLOW_COPY_AND_ASSIGN(MojoContextState); }; |