| Index: chrome/renderer/extensions/dispatcher.cc
|
| diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc
|
| index b54f225842bc7a42da85d47ca542c9ef3d3f3f59..30d6ed6c9e0bd767bc79d1fb7f2f71e3d6b277ad 100644
|
| --- a/chrome/renderer/extensions/dispatcher.cc
|
| +++ b/chrome/renderer/extensions/dispatcher.cc
|
| @@ -692,6 +692,8 @@ void Dispatcher::PopulateSourceMap() {
|
| // Platform app sources that are not API-specific..
|
| source_map_.RegisterSource("tagWatcher", IDR_TAG_WATCHER_JS);
|
| source_map_.RegisterSource("webview", IDR_WEB_VIEW_JS);
|
| + source_map_.RegisterSource("webview.experimentalAPI",
|
| + IDR_WEB_VIEW_EXPERIMENTAL_API_JS);
|
| source_map_.RegisterSource("denyWebview", IDR_WEB_VIEW_DENY_JS);
|
| source_map_.RegisterSource("platformApp", IDR_PLATFORM_APP_JS);
|
| source_map_.RegisterSource("injectAppTitlebar", IDR_INJECT_APP_TITLEBAR_JS);
|
| @@ -824,6 +826,10 @@ void Dispatcher::DidCreateScriptContext(
|
| if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) {
|
| bool has_permission = extension->HasAPIPermission(APIPermission::kWebView);
|
| module_system->Require(has_permission ? "webview" : "denyWebview");
|
| + if (has_permission &&
|
| + extension->HasAPIPermission(APIPermission::kExperimental)) {
|
| + module_system->Require("webview.experimentalAPI");
|
| + }
|
| }
|
|
|
| context->set_module_system(module_system.Pass());
|
|
|