summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/tab_contents/render_view_host_delegate_helper.cc6
-rw-r--r--chrome/common/chrome_switches.cc4
-rw-r--r--chrome/common/chrome_switches.h1
-rw-r--r--webkit/glue/plugins/plugin_list_mac.mm7
4 files changed, 13 insertions, 5 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
index 9a7a7c00..ec00ba5 100644
--- a/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
+++ b/chrome/browser/tab_contents/render_view_host_delegate_helper.cc
@@ -155,9 +155,15 @@ WebPreferences RenderViewHostDelegateHelper::GetWebkitPrefs(
web_prefs.web_security_enabled =
!command_line.HasSwitch(switches::kDisableWebSecurity) &&
prefs->GetBoolean(prefs::kWebKitWebSecurityEnabled);
+#if defined(OS_WIN)
web_prefs.plugins_enabled =
!command_line.HasSwitch(switches::kDisablePlugins) &&
prefs->GetBoolean(prefs::kWebKitPluginsEnabled);
+#else
+ web_prefs.plugins_enabled =
+ command_line.HasSwitch(switches::kEnablePlugins) &&
+ prefs->GetBoolean(prefs::kWebKitPluginsEnabled);
+#endif
web_prefs.java_enabled =
!command_line.HasSwitch(switches::kDisableJava) &&
prefs->GetBoolean(prefs::kWebKitJavaEnabled);
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index c38e0b1..0462705 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -359,6 +359,10 @@ const wchar_t kDisableJava[] = L"disable-java";
// Prevent plugins from running.
const wchar_t kDisablePlugins[] = L"disable-plugins";
+// Force plugins to run (for ports in progress where they are turned off by
+// default).
+const wchar_t kEnablePlugins[] = L"enable-plugins";
+
// Prevent images from loading.
const wchar_t kDisableImages[] = L"disable-images";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 3588b46..8cd241e 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -124,6 +124,7 @@ extern const wchar_t kDisablePopupBlocking[];
extern const wchar_t kDisableJavaScript[];
extern const wchar_t kDisableJava[];
extern const wchar_t kDisablePlugins[];
+extern const wchar_t kEnablePlugins[];
extern const wchar_t kDisableImages[];
extern const wchar_t kDisableWebSecurity[];
extern const wchar_t kEnableRemoteFonts[];
diff --git a/webkit/glue/plugins/plugin_list_mac.mm b/webkit/glue/plugins/plugin_list_mac.mm
index 28cf21d..90391ec 100644
--- a/webkit/glue/plugins/plugin_list_mac.mm
+++ b/webkit/glue/plugins/plugin_list_mac.mm
@@ -68,15 +68,12 @@ void PluginList::LoadPluginsFromDir(const FilePath &path) {
}
bool PluginList::ShouldLoadPlugin(const WebPluginInfo& info) {
- // TODO(port): uncomment the next line to enable plugins--disabled by
- // default so that public dev builds fall back correctly to the no-plugin
- // code on pages with plugins.
- return false;
-
// Hierarchy check
// (we're loading plugins hierarchically from Library folders, so plugins we
// encounter earlier must override plugins we encounter later)
+ // first, test to make sure the user really wants plugins
+
for (size_t i = 0; i < plugins_.size(); ++i) {
if (plugins_[i].path.BaseName() == info.path.BaseName()) {
return false; // We already have a loaded plugin higher in the hierarchy.