summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 08:07:46 +0000
committerbauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-01 08:07:46 +0000
commita16a421b3959938bd40e9101b2bc86f4ad46e454 (patch)
treed578fb60741ab29186bc6d24f69402f28782f678 /chrome
parentd37d45ab0d5ef606b0f44d9591bfdb457d7de733 (diff)
downloadchromium_src-a16a421b3959938bd40e9101b2bc86f4ad46e454.zip
chromium_src-a16a421b3959938bd40e9101b2bc86f4ad46e454.tar.gz
chromium_src-a16a421b3959938bd40e9101b2bc86f4ad46e454.tar.bz2
Enable click-to-play by default.
Click-to-play can be disabled using the --disable-click-to-play command line switch. BUG=35316 TEST=none Review URL: http://codereview.chromium.org/3250012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58147 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/cocoa/content_setting_bubble_cocoa.mm4
-rw-r--r--chrome/browser/content_setting_bubble_model.cc8
-rw-r--r--chrome/browser/content_setting_bubble_model_unittest.cc2
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc2
-rw-r--r--chrome/common/chrome_switches.cc6
-rw-r--r--chrome/common/chrome_switches.h2
-rw-r--r--chrome/renderer/render_view.cc10
7 files changed, 17 insertions, 17 deletions
diff --git a/chrome/browser/cocoa/content_setting_bubble_cocoa.mm b/chrome/browser/cocoa/content_setting_bubble_cocoa.mm
index 9d34f16..c3c8110 100644
--- a/chrome/browser/cocoa/content_setting_bubble_cocoa.mm
+++ b/chrome/browser/cocoa/content_setting_bubble_cocoa.mm
@@ -391,8 +391,8 @@ NSTextField* LabelWithFrame(NSString* text, const NSRect& frame) {
}
- (void)sizeToFitLoadPluginsButton {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableClickToPlay)) {
const ContentSettingBubbleModel::BubbleContent& content =
contentSettingBubbleModel_->bubble_content();
[loadAllPluginsButton_ setEnabled:content.load_plugins_link_enabled];
diff --git a/chrome/browser/content_setting_bubble_model.cc b/chrome/browser/content_setting_bubble_model.cc
index 7c9d1dc..ba36e4d 100644
--- a/chrome/browser/content_setting_bubble_model.cc
+++ b/chrome/browser/content_setting_bubble_model.cc
@@ -288,16 +288,16 @@ class ContentSettingPluginBubbleModel : public ContentSettingSingleRadioGroup {
private:
void SetLoadPluginsLinkTitle() {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableClickToPlay)) {
set_load_plugins_link_title(
l10n_util::GetStringUTF8(IDS_BLOCKED_PLUGINS_LOAD_ALL));
}
}
virtual void OnLoadPluginsLinkClicked() {
- DCHECK(CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay));
+ DCHECK(!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableClickToPlay));
if (tab_contents()) {
tab_contents()->render_view_host()->LoadBlockedPlugins();
}
diff --git a/chrome/browser/content_setting_bubble_model_unittest.cc b/chrome/browser/content_setting_bubble_model_unittest.cc
index d7c55ee..d114e89 100644
--- a/chrome/browser/content_setting_bubble_model_unittest.cc
+++ b/chrome/browser/content_setting_bubble_model_unittest.cc
@@ -98,7 +98,7 @@ TEST_F(ContentSettingBubbleModelTest, Plugins) {
EXPECT_NE(std::string(), bubble_content.manage_link);
EXPECT_EQ(std::string(), bubble_content.info_link);
EXPECT_NE(std::string(), bubble_content.title);
- EXPECT_EQ(std::string(), bubble_content.load_plugins_link_title);
+ EXPECT_NE(std::string(), bubble_content.load_plugins_link_title);
}
TEST_F(ContentSettingBubbleModelTest, Geolocation) {
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 863362f..0a891a3 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -574,7 +574,7 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer(
switches::kBlockNonSandboxedPlugins,
switches::kDisableOutdatedPlugins,
switches::kEnableRemoting,
- switches::kEnableClickToPlay,
+ switches::kDisableClickToPlay,
switches::kEnableResourceContentSettings,
switches::kPrelaunchGpuProcess,
switches::kEnableAcceleratedCompositing,
diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc
index ad1ef4b..811ff81 100644
--- a/chrome/common/chrome_switches.cc
+++ b/chrome/common/chrome_switches.cc
@@ -147,6 +147,9 @@ const char kDisableBackingStoreLimit[] = "disable-backing-store-limit";
// Disable support for cached byte-ranges.
const char kDisableByteRangeSupport[] = "disable-byte-range-support";
+// Disable click-to-play for blocked plug-ins.
+const char kDisableClickToPlay[] = "disable-click-to-play";
+
// Disables establishing a backup TCP connection if a specified timeout is
// exceeded.
const char kDisableConnectBackupJobs[] = "disable-connect-backup-jobs";
@@ -360,9 +363,6 @@ const char kEnableBenchmarking[] = "enable-benchmarking";
// Chromoting Host Process within the service process.
const char kEnableRemoting[] = "enable-remoting";
-// Enable click-to-play for blocked plugins.
-const char kEnableClickToPlay[] = "enable-click-to-play";
-
// This applies only when the process type is "service". Enables the
// Cloud Print Proxy component within the service process.
const char kEnableCloudPrintProxy[] = "enable-cloud-print-proxy";
diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h
index 9cab59b..50104a3 100644
--- a/chrome/common/chrome_switches.h
+++ b/chrome/common/chrome_switches.h
@@ -54,6 +54,7 @@ extern const char kDisableAudio[];
extern const char kDisableAuthNegotiateCnameLookup[];
extern const char kDisableBackingStoreLimit[];
extern const char kDisableByteRangeSupport[];
+extern const char kDisableClickToPlay[];
extern const char kDisableConnectBackupJobs[];
extern const char kDisableContentPrefetch[];
extern const char kDisableCustomJumpList[];
@@ -114,7 +115,6 @@ extern const char kEnableAuthNegotiatePort[];
extern const char kEnableBackgroundMode[];
extern const char kEnableBenchmarking[];
extern const char kEnableRemoting[];
-extern const char kEnableClickToPlay[];
extern const char kEnableCloudPrintProxy[];
extern const char kEnableCloudPrint[];
extern const char kEnableConnectBackupJobs[];
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 49e6934..861722a 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2359,7 +2359,7 @@ WebPlugin* RenderView::createPlugin(WebFrame* frame,
#endif
}
if (setting == CONTENT_SETTING_BLOCK) {
- DCHECK(cmd->HasSwitch(switches::kEnableClickToPlay));
+ DCHECK(!cmd->HasSwitch(switches::kDisableClickToPlay));
DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS, resource);
return CreatePluginPlaceholder(frame, params, NULL);
}
@@ -2525,12 +2525,12 @@ bool RenderView::allowImages(WebFrame* frame, bool enabled_per_settings) {
}
bool RenderView::allowPlugins(WebFrame* frame, bool enabled_per_settings) {
- if (CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kEnableClickToPlay)) {
+ if (!CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kDisableClickToPlay)) {
return WebFrameClient::allowPlugins(frame, enabled_per_settings);
}
- return (enabled_per_settings &&
- AllowContentType(CONTENT_SETTINGS_TYPE_PLUGINS));
+ return enabled_per_settings &&
+ AllowContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
}