Index: chrome/browser/extensions/active_tab_permission_granter.cc |
diff --git a/chrome/browser/extensions/active_tab_permission_granter.cc b/chrome/browser/extensions/active_tab_permission_granter.cc |
index 8a766d7338b398586d427ef45f198967e765fa18..31fb2e6b40ef3a77dfa7b4c0c61b945ff0a747ae 100644 |
--- a/chrome/browser/extensions/active_tab_permission_granter.cc |
+++ b/chrome/browser/extensions/active_tab_permission_granter.cc |
@@ -48,6 +48,12 @@ void ActiveTabPermissionGranter::GrantIfRequested(const Extension* extension) { |
URLPattern pattern(UserScript::ValidUserScriptSchemes()); |
if (pattern.Parse(web_contents()->GetURL().spec()) != |
URLPattern::PARSE_SUCCESS) { |
+ // Allow tabCapture API to be granted access to chrome:// pages since it |
+ // already requests all hosts permissions on extension install. |
+ if (extension->HasAPIPermission(extensions::APIPermission::kTabCapture)) { |
+ granted_extensions_.Insert(extension); |
not at google - send to devlin
2013/06/17 18:14:13
this means that an extension with the tab capture
not at google - send to devlin
2013/06/17 18:16:09
checking it elsewhere wouldn't work either. maybe
justinlin
2013/06/17 18:22:20
Does it actually do that? I thought the injection
not at google - send to devlin
2013/06/17 18:44:45
I see; IsGranted is only used in the tab capture A
|
+ } |
+ |
// Pattern parsing could fail if this is an unsupported URL e.g. chrome://. |
return; |
} |