Index: content/browser/plugin_service_impl.cc |
diff --git a/content/browser/plugin_service_impl.cc b/content/browser/plugin_service_impl.cc |
index 1b7ad7641c43cbb8d517b76869f17def73732935..3b8c2197ed91deac303d0658a7097b9f25fc802d 100644 |
--- a/content/browser/plugin_service_impl.cc |
+++ b/content/browser/plugin_service_impl.cc |
@@ -190,6 +190,9 @@ void PluginServiceImpl::Init() { |
if (command_line->HasSwitch(switches::kDisablePluginsDiscovery)) |
PluginList::Singleton()->DisablePluginsDiscovery(); |
+#if defined(OS_WIN) || defined(OS_MACOSX) |
+ npapi_plugins_enabled_ = command_line->HasSwitch(switches::kEnableNpapi); |
+#endif |
} |
void PluginServiceImpl::StartWatchingPlugins() { |
@@ -801,7 +804,7 @@ void PluginServiceImpl::GetInternalPlugins( |
bool PluginServiceImpl::NPAPIPluginsSupported() { |
#if defined(OS_WIN) || defined(OS_MACOSX) |
- return true; |
+ return npapi_plugins_enabled_; |
#else |
return false; |
#endif |
@@ -811,6 +814,12 @@ void PluginServiceImpl::DisablePluginsDiscoveryForTesting() { |
PluginList::Singleton()->DisablePluginsDiscovery(); |
} |
+#if defined(OS_WIN) || defined(OS_MACOSX) |
+void PluginServiceImpl::EnableNpapiPluginsForTesting() { |
+ npapi_plugins_enabled_ = true; |
+} |
+#endif |
+ |
#if defined(OS_MACOSX) |
void PluginServiceImpl::AppActivated() { |
BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, |