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

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

Issue 23653012: Support webview tag in component extension (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add whitelist Created 7 years, 3 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 | « chrome/common/extensions/api/_permission_features.json ('k') | 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 b8a5e48a695e2e68e4761d8ca311fd5db79812fa..ee43b1e72229db452ce93d1252a7eef916948b65 100644
--- a/chrome/renderer/extensions/dispatcher.cc
+++ b/chrome/renderer/extensions/dispatcher.cc
@@ -478,8 +478,7 @@ void Dispatcher::WebKitInitialized() {
InitOriginPermissions(extension);
}
- if (IsWithinPlatformApp())
- EnableCustomElementWhiteList();
+ EnableCustomElementWhiteList();
is_webkit_initialized_ = true;
}
@@ -1110,11 +1109,15 @@ void Dispatcher::DidCreateScriptContext(
module_system->Require("windowControls");
}
- // Only platform apps support the <webview> tag, because the "webView" and
- // "denyWebView" modules will affect the performance of DOM modifications
+ // Currently only exts/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) {
+ // We used to limit WebView to |BLESSED_EXTENSION_CONTEXT| within platform
+ // apps. An ext/app runs in a blessed extension context, if it is the active
+ // extension in the current process, in other words, if it is loaded in the
+ // top frame. To support webview in iframed extensions, we have to drop the
Charlie Reis 2013/09/19 17:04:41 I don't understand why this is in this CL. The CL
guohui1 2013/09/19 17:50:32 agree, Fady has pointed out the same thing in a of
+ // check.
+ if (extension) {
// 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)) {
@@ -1248,8 +1251,7 @@ void Dispatcher::OnActivateExtension(const std::string& extension_id) {
extension->url(),
string16());
- if (IsWithinPlatformApp())
- EnableCustomElementWhiteList();
+ EnableCustomElementWhiteList();
}
}
« no previous file with comments | « chrome/common/extensions/api/_permission_features.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698