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

Side by Side Diff: chrome/browser/gtk/options/content_filter_page_gtk.cc

Issue 5238002: Reintegrate 552 r66225-r66645.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/552d/src/
Patch Set: '' 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/gtk/options/content_filter_page_gtk.h" 5 #include "chrome/browser/gtk/options/content_filter_page_gtk.h"
6 6
7 #include "app/l10n_util.h" 7 #include "app/l10n_util.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/browser.h" 9 #include "chrome/browser/browser.h"
10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h" 10 #include "chrome/browser/geolocation/geolocation_content_settings_map.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 0, // This dialog isn't used for cookies. 76 0, // This dialog isn't used for cookies.
77 0, 77 0,
78 0, 78 0,
79 IDS_PLUGIN_ASK_RADIO, 79 IDS_PLUGIN_ASK_RADIO,
80 0, 80 0,
81 IDS_GEOLOCATION_ASK_RADIO, 81 IDS_GEOLOCATION_ASK_RADIO,
82 IDS_NOTIFICATIONS_ASK_RADIO, 82 IDS_NOTIFICATIONS_ASK_RADIO,
83 }; 83 };
84 COMPILE_ASSERT(arraysize(kAskIDs) == CONTENT_SETTINGS_NUM_TYPES, 84 COMPILE_ASSERT(arraysize(kAskIDs) == CONTENT_SETTINGS_NUM_TYPES,
85 kAskIDs_IncorrectSize); 85 kAskIDs_IncorrectSize);
86 if (kAskIDs[content_type_]) { 86 int askID = kAskIDs[content_type_];
87 if (content_type_ == CONTENT_SETTINGS_TYPE_PLUGINS &&
88 !CommandLine::ForCurrentProcess()->HasSwitch(
89 switches::kEnableClickToPlay)) {
90 askID = 0;
91 }
92
93 if (askID) {
87 ask_radio_ = gtk_radio_button_new_with_label_from_widget( 94 ask_radio_ = gtk_radio_button_new_with_label_from_widget(
88 GTK_RADIO_BUTTON(allow_radio_), 95 GTK_RADIO_BUTTON(allow_radio_),
89 l10n_util::GetStringUTF8(kAskIDs[content_type_]).c_str()); 96 l10n_util::GetStringUTF8(askID).c_str());
90 gtk_box_pack_start(GTK_BOX(vbox), ask_radio_, FALSE, FALSE, 0); 97 gtk_box_pack_start(GTK_BOX(vbox), ask_radio_, FALSE, FALSE, 0);
91 } 98 }
92 99
93 static const int kBlockIDs[] = { 100 static const int kBlockIDs[] = {
94 0, // This dialog isn't used for cookies. 101 0, // This dialog isn't used for cookies.
95 IDS_IMAGES_NOLOAD_RADIO, 102 IDS_IMAGES_NOLOAD_RADIO,
96 IDS_JS_DONOTALLOW_RADIO, 103 IDS_JS_DONOTALLOW_RADIO,
97 IDS_PLUGIN_NOLOAD_RADIO, 104 IDS_PLUGIN_NOLOAD_RADIO,
98 IDS_POPUP_BLOCK_RADIO, 105 IDS_POPUP_BLOCK_RADIO,
99 IDS_GEOLOCATION_BLOCK_RADIO, 106 IDS_GEOLOCATION_BLOCK_RADIO,
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 return; 229 return;
223 } 230 }
224 ContentExceptionsWindowGtk::ShowExceptionsWindow( 231 ContentExceptionsWindowGtk::ShowExceptionsWindow(
225 GTK_WINDOW(gtk_widget_get_toplevel(button)), 232 GTK_WINDOW(gtk_widget_get_toplevel(button)),
226 settings_map, otr_settings_map, content_type_); 233 settings_map, otr_settings_map, content_type_);
227 } 234 }
228 235
229 void ContentFilterPageGtk::OnPluginsPageLinkClicked(GtkWidget* button) { 236 void ContentFilterPageGtk::OnPluginsPageLinkClicked(GtkWidget* button) {
230 browser::ShowOptionsURL(profile(), GURL(chrome::kChromeUIPluginsURL)); 237 browser::ShowOptionsURL(profile(), GURL(chrome::kChromeUIPluginsURL));
231 } 238 }
OLDNEW
« no previous file with comments | « chrome/browser/content_setting_combo_model.cc ('k') | chrome/browser/host_content_settings_map.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698