diff options
author | lazyboy <lazyboy@chromium.org> | 2015-06-09 15:18:18 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-09 22:19:58 +0000 |
commit | df345d7ae7e0a524eaab0466573f7aad68c86a88 (patch) | |
tree | 8fab974d88655bbdff4c15a59ec861f579db3f78 /extensions/renderer/dispatcher.cc | |
parent | bf3a87084ef2fcfd33de53b43cbdac2bfc6a81e8 (diff) | |
download | chromium_src-df345d7ae7e0a524eaab0466573f7aad68c86a88.zip chromium_src-df345d7ae7e0a524eaab0466573f7aad68c86a88.tar.gz chromium_src-df345d7ae7e0a524eaab0466573f7aad68c86a88.tar.bz2 |
Extract the element implementation logic to function mods in <webview>.
function mods end with "$".
"element" inside <webview> is currently the plugin <object> element, i.e.
the browser plugin. This CL makes it possible to provide a different
implementation for the element. This CL also provides a stub
using <iframe>. This will be used by the <webview> using OOPIF
architecture CL: https://chromiumcodereview.appspot.com/972313002/
BUG=330264
Test=None, no visible changes.
Review URL: https://codereview.chromium.org/1165773004
Cr-Commit-Position: refs/heads/master@{#333592}
Diffstat (limited to 'extensions/renderer/dispatcher.cc')
-rw-r--r-- | extensions/renderer/dispatcher.cc | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/extensions/renderer/dispatcher.cc b/extensions/renderer/dispatcher.cc index b456315..17c6dbe 100644 --- a/extensions/renderer/dispatcher.cc +++ b/extensions/renderer/dispatcher.cc @@ -472,6 +472,15 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() { resources.push_back(std::make_pair("guestViewDeny", IDR_GUEST_VIEW_DENY_JS)); resources.push_back(std::make_pair("guestViewEvents", IDR_GUEST_VIEW_EVENTS_JS)); + + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + ::switches::kSitePerProcess)) { + resources.push_back(std::make_pair("guestViewIframe", + IDR_GUEST_VIEW_IFRAME_JS)); + resources.push_back(std::make_pair("guestViewIframeContainer", + IDR_GUEST_VIEW_IFRAME_CONTAINER_JS)); + } + resources.push_back(std::make_pair("imageUtil", IDR_IMAGE_UTIL_JS)); resources.push_back(std::make_pair("json_schema", IDR_JSON_SCHEMA_JS)); resources.push_back(std::make_pair("lastError", IDR_LAST_ERROR_JS)); @@ -509,6 +518,11 @@ std::vector<std::pair<std::string, int> > Dispatcher::GetJsResources() { resources.push_back(std::make_pair("webViewEvents", IDR_WEB_VIEW_EVENTS_JS)); resources.push_back(std::make_pair("webViewInternal", IDR_WEB_VIEW_INTERNAL_CUSTOM_BINDINGS_JS)); + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + ::switches::kSitePerProcess)) { + resources.push_back(std::make_pair("webViewIframe", + IDR_WEB_VIEW_IFRAME_JS)); + } resources.push_back( std::make_pair(mojo::kBindingsModuleName, IDR_MOJO_BINDINGS_JS)); resources.push_back( @@ -1417,6 +1431,11 @@ void Dispatcher::RequireGuestViewModules(ScriptContext* context) { module_system->Require("webView"); module_system->Require("webViewApiMethods"); module_system->Require("webViewAttributes"); + + if (base::CommandLine::ForCurrentProcess()->HasSwitch( + ::switches::kSitePerProcess)) { + module_system->Require("webViewIframe"); + } } // The "guestViewDeny" module must always be loaded last. It registers |