Index: chrome/renderer/extensions/dispatcher.cc |
diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc |
index 887a26df22a8931c14243bb13e37ebe5eeeae364..452796564bdeddc3e404e65954eff50042dad0ee 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(); |
Charlie Reis
2013/03/20 01:52:25
Wait, you're changing behavior here. We're using
|
// 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) { |
// 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)) { |