Chromium Code Reviews| Index: chrome/renderer/extensions/dispatcher.cc |
| diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc |
| index 887a26df22a8931c14243bb13e37ebe5eeeae364..095374410af3866eaaa0b63e488572e29e53cb4c 100644 |
| --- a/chrome/renderer/extensions/dispatcher.cc |
| +++ b/chrome/renderer/extensions/dispatcher.cc |
| @@ -977,11 +977,16 @@ void Dispatcher::DidCreateScriptContext( |
| } |
| } |
| + bool is_within_platform_app = extension && extension->is_platform_app(); |
| // Inject custom JS into the platform app context. |
| - if (IsWithinPlatformApp(frame)) |
| + if (is_within_platform_app) |
| module_system->Require("platformApp"); |
| - if (context_type == Feature::BLESSED_EXTENSION_CONTEXT) { |
| + // Only platform apps support the <webview> tag, because the "webView" and |
| + // "denyWebView" modules will affect the performance of DOM modifications |
| + // (http://crbug.com/196453). |
| + if (context_type == Feature::BLESSED_EXTENSION_CONTEXT && |
| + is_within_platform_app) { |
|
mthiesse
2013/03/19 18:45:28
Drive-by nit: indentation is off.
|
| // Note: setting up the WebView class here, not the chrome.webview API. |
| // The API will be automatically set up when first used. |
| if (extension->HasAPIPermission(APIPermission::kWebView)) { |