diff options
author | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 16:36:16 +0000 |
---|---|---|
committer | bauerb@chromium.org <bauerb@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-12 16:36:16 +0000 |
commit | 3627b06dd62f0e4748ab57208eac7988c92932a2 (patch) | |
tree | ea09e487e10a072b1ce2b16c55bf90dfcd466e94 /chrome/browser/content_setting_combo_model.cc | |
parent | 2500710027b1034c281b4ef99e0907d96759996b (diff) | |
download | chromium_src-3627b06dd62f0e4748ab57208eac7988c92932a2.zip chromium_src-3627b06dd62f0e4748ab57208eac7988c92932a2.tar.gz chromium_src-3627b06dd62f0e4748ab57208eac7988c92932a2.tar.bz2 |
Move click-to-play to about:flags.
XIB changes: Add an outlet |pluginDefaultSettingMatrix_| to ContentSettingsDialogController, hooked up to the associated matrix, to remove the click-to-play radio button.
While I'm at it, clean up a bit:
* Remove the old --disable-click-to-play flag that reverted to the M6 behavior for blocked plugins
* Make ContentExceptionsWindowController use ContentSettingComboModel for the action popup.
* Make HostContentSettingsMapTest use AutoReset to reset command line switches.
BUG=62091
TEST=unit_tests
Review URL: http://codereview.chromium.org/4643007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65953 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/content_setting_combo_model.cc')
-rw-r--r-- | chrome/browser/content_setting_combo_model.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome/browser/content_setting_combo_model.cc b/chrome/browser/content_setting_combo_model.cc index ec39a13..3606587 100644 --- a/chrome/browser/content_setting_combo_model.cc +++ b/chrome/browser/content_setting_combo_model.cc @@ -36,7 +36,8 @@ ContentSettingComboModel::~ContentSettingComboModel() { } int ContentSettingComboModel::GetItemCount() { - if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS) + if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS && + CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableClickToPlay)) return arraysize(kAskSettings); if (content_type_ == CONTENT_SETTINGS_TYPE_COOKIES) return arraysize(kSessionSettings); @@ -60,7 +61,8 @@ string16 ContentSettingComboModel::GetItemAt(int index) { } ContentSetting ContentSettingComboModel::SettingForIndex(int index) { - if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS) + if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS && + CommandLine::ForCurrentProcess()->HasSwitch(switches::kEnableClickToPlay)) return kAskSettings[index]; if (content_type_ == CONTENT_SETTINGS_TYPE_COOKIES) return kSessionSettings[index]; |