Chromium Code Reviews| Index: chrome/renderer/extensions/dispatcher.cc |
| diff --git a/chrome/renderer/extensions/dispatcher.cc b/chrome/renderer/extensions/dispatcher.cc |
| index 98af97c65ca42c6f3fd51ada3fda3a25ecc406b5..b851dc11e7ce6066b59bbec67872595820fde66c 100644 |
| --- a/chrome/renderer/extensions/dispatcher.cc |
| +++ b/chrome/renderer/extensions/dispatcher.cc |
| @@ -1183,39 +1183,33 @@ void Dispatcher::DidCreateScriptContext( |
| module_system->Require("windowControls"); |
| } |
| - // Currently only platform apps and whitelisted component extensions support |
| - // the <webview> tag, because the "denyWebView" module will affect the |
| - // performance of DOM modifications (http://crbug.com/196453). |
| // 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 a top |
| // frame. To support webview in a non-frame extension, we have to allow |
| // unblessed extension context as well. |
| - if (context_type == Feature::BLESSED_EXTENSION_CONTEXT || |
| - context_type == Feature::UNBLESSED_EXTENSION_CONTEXT) { |
|
not at google - send to devlin
2014/01/14 23:58:49
it's premature to delete this altogether, you prob
Fady Samuel
2014/01/17 22:35:10
Done.
|
| - // 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)) { |
| - module_system->Require("webView"); |
| - bool includeExperimental = |
| - GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV; |
| - if (!includeExperimental) { |
| - // TODO(asargent) We need a whitelist for webview experimental. |
| - // crbug.com/264852 |
| - std::string id_hash = base::SHA1HashString(extension->id()); |
| - std::string hexencoded_id_hash = base::HexEncode(id_hash.c_str(), |
| - id_hash.length()); |
| - if (hexencoded_id_hash == "8C3741E3AF0B93B6E8E0DDD499BB0B74839EA578" || |
| - hexencoded_id_hash == "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB" || |
| - hexencoded_id_hash == "1A26E32DE447A17CBE5E9750CDBA78F58539B39C" || |
| - hexencoded_id_hash == "59048028102D7B4C681DBC7BC6CD980C3DC66DA3") |
| - includeExperimental = true; |
| - } |
| - if (includeExperimental) |
| - module_system->Require("webViewExperimental"); |
| - } else { |
| - module_system->Require("denyWebView"); |
| + // 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)) { |
| + module_system->Require("webView"); |
| + bool includeExperimental = |
| + GetCurrentChannel() <= chrome::VersionInfo::CHANNEL_DEV; |
| + if (!includeExperimental) { |
| + // TODO(asargent) We need a whitelist for webview experimental. |
| + // crbug.com/264852 |
| + std::string id_hash = base::SHA1HashString(extension->id()); |
| + std::string hexencoded_id_hash = base::HexEncode(id_hash.c_str(), |
| + id_hash.length()); |
| + if (hexencoded_id_hash == "8C3741E3AF0B93B6E8E0DDD499BB0B74839EA578" || |
| + hexencoded_id_hash == "E703483CEF33DEC18B4B6DD84B5C776FB9182BDB" || |
| + hexencoded_id_hash == "1A26E32DE447A17CBE5E9750CDBA78F58539B39C" || |
| + hexencoded_id_hash == "59048028102D7B4C681DBC7BC6CD980C3DC66DA3") |
| + includeExperimental = true; |
| } |
| + if (includeExperimental) |
|
not at google - send to devlin
2014/01/14 23:58:49
include_experimental, though, why isn't this check
Fady Samuel
2014/01/17 22:35:10
I think I capture what you're suggesting here. Doe
|
| + module_system->Require("webViewExperimental"); |
| + } else { |
| + module_system->Require("denyWebView"); |
| } |
| // Same comment as above for <adview> tag. |