Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(43)

Unified Diff: chrome/renderer/extensions/dispatcher.cc

Issue 12496015: Make sure only platform app support <webview> tag (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: indentation issue Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698