Chromium Code Reviews| Index: chrome/renderer/extensions/dispatcher.cc |
| diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc |
| index ce2408f603efa9981090d4b2242f9c4b04652aef..bc5e519b32ad30dd41c56ed4c0aa88f1e059b18f 100644 |
| --- a/chrome/renderer/extensions/dispatcher.cc |
| +++ b/chrome/renderer/extensions/dispatcher.cc |
| @@ -1114,11 +1114,16 @@ 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 |
| - // (http://crbug.com/196453). |
| - if (context_type == Feature::BLESSED_EXTENSION_CONTEXT && |
| - is_within_platform_app) { |
| + // Currently only platform apps and whitelisted component extensions support |
| + // the <webview> tag, because the "webView" and "denyWebView" modules will |
|
Fady Samuel
2013/09/19 18:50:49
This is only currently true of denyWebview now as
guohui
2013/09/19 19:32:29
Done.
|
| + // affect the performance of DOM modifications (http://crbug.com/196453). |
| + // We used to limit WebView to |BLESSED_EXTENSION_CONTEXT| within platform |
|
Fady Samuel
2013/09/19 18:50:49
Remove extra space before We.
guohui
2013/09/19 19:32:29
Done.
|
| + // 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 an iframed extension, we have to allow |
| + // unblessed extension context as well. |
| + if (context_type == Feature::BLESSED_EXTENSION_CONTEXT || |
| + context_type == Feature::UNBLESSED_EXTENSION_CONTEXT) { |
| // 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)) { |