Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2555)

Unified Diff: chrome/browser/gtk/options/content_filter_page_gtk.cc

Issue 4643007: Move click-to-play to about:flags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/gtk/options/content_filter_page_gtk.cc
diff --git a/chrome/browser/gtk/options/content_filter_page_gtk.cc b/chrome/browser/gtk/options/content_filter_page_gtk.cc
index 6645a22e361482cf50dadd8e61dae6f67ef5a66f..d352f52ea712cbc86cdb7a776753bdd14b0a3c02 100644
--- a/chrome/browser/gtk/options/content_filter_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_filter_page_gtk.cc
@@ -83,10 +83,17 @@ GtkWidget* ContentFilterPageGtk::InitGroup() {
};
COMPILE_ASSERT(arraysize(kAskIDs) == CONTENT_SETTINGS_NUM_TYPES,
kAskIDs_IncorrectSize);
- if (kAskIDs[content_type_]) {
+ int askID = kAskIDs[content_type_];
+ if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableClickToPlay)) {
+ askID = 0;
+ }
+
+ if (askID) {
ask_radio_ = gtk_radio_button_new_with_label_from_widget(
GTK_RADIO_BUTTON(allow_radio_),
- l10n_util::GetStringUTF8(kAskIDs[content_type_]).c_str());
+ l10n_util::GetStringUTF8(askID).c_str());
gtk_box_pack_start(GTK_BOX(vbox), ask_radio_, FALSE, FALSE, 0);
}

Powered by Google App Engine
This is Rietveld 408576698