| Index: chrome/browser/chrome_content_browser_client.cc
|
| diff --git a/chrome/browser/chrome_content_browser_client.cc b/chrome/browser/chrome_content_browser_client.cc
|
| index 2c0bdfe3267041f0e91f68a1d48cb7d6f4e6e451..1bdb4f038ff518203662dc1bd34b80654ea1c061 100644
|
| --- a/chrome/browser/chrome_content_browser_client.cc
|
| +++ b/chrome/browser/chrome_content_browser_client.cc
|
| @@ -1967,6 +1967,26 @@ content::BrowserPpapiHost*
|
| return NULL;
|
| }
|
|
|
| +bool ChromeContentBrowserClient::SupportsBrowserPlugin(
|
| + content::BrowserContext* browser_context, const GURL& site_url) {
|
| + if (CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableBrowserPluginForAllViewTypes))
|
| + return true;
|
| +
|
| + Profile* profile = Profile::FromBrowserContext(browser_context);
|
| + ExtensionService* service =
|
| + extensions::ExtensionSystem::Get(profile)->extension_service();
|
| + if (!service)
|
| + return false;
|
| +
|
| + const Extension* extension = service->extensions()->
|
| + GetExtensionOrAppByURL(ExtensionURLInfo(site_url));
|
| + if (!extension)
|
| + return false;
|
| +
|
| + return extension->HasAPIPermission(APIPermission::kWebView);
|
| +}
|
| +
|
| bool ChromeContentBrowserClient::AllowPepperSocketAPI(
|
| content::BrowserContext* browser_context,
|
| const GURL& url,
|
|
|