diff options
Diffstat (limited to 'chrome/browser/gtk/options')
-rw-r--r-- | chrome/browser/gtk/options/advanced_contents_gtk.cc | 49 | ||||
-rw-r--r-- | chrome/browser/gtk/options/content_page_gtk.h | 2 | ||||
-rw-r--r-- | chrome/browser/gtk/options/general_page_gtk.cc | 4 | ||||
-rw-r--r-- | chrome/browser/gtk/options/options_window_gtk.cc | 30 |
4 files changed, 4 insertions, 81 deletions
diff --git a/chrome/browser/gtk/options/advanced_contents_gtk.cc b/chrome/browser/gtk/options/advanced_contents_gtk.cc index 2ceb997..d493a39 100644 --- a/chrome/browser/gtk/options/advanced_contents_gtk.cc +++ b/chrome/browser/gtk/options/advanced_contents_gtk.cc @@ -18,7 +18,6 @@ #include "chrome/browser/browser_process.h" #include "chrome/browser/download/download_manager.h" #include "chrome/browser/fonts_languages_window.h" -#include "chrome/browser/gtk/accessible_widget_helper_gtk.h" #include "chrome/browser/gtk/gtk_chrome_link_button.h" #include "chrome/browser/gtk/options/cookies_view.h" #include "chrome/browser/gtk/options/options_layout_gtk.h" @@ -83,7 +82,6 @@ GtkWidget* AddCheckButtonWithWrappedLabel(int string_id, GtkWidget* checkbox = CreateCheckButtonWithWrappedLabel(string_id); gtk_box_pack_start(GTK_BOX(container), checkbox, FALSE, FALSE, 0); g_signal_connect(checkbox, "toggled", handler, data); - return checkbox; } @@ -169,19 +167,13 @@ class DownloadSection : public OptionsPageBase { // then turning around and saving them again. bool pref_changing_; - scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; - DISALLOW_COPY_AND_ASSIGN(DownloadSection); }; DownloadSection::DownloadSection(Profile* profile) - : OptionsPageBase(profile), - pref_changing_(true) { + : OptionsPageBase(profile), pref_changing_(true) { page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); - accessible_widget_helper_.reset(new AccessibleWidgetHelper( - page_, profile)); - // Download location options. download_location_button_ = gtk_file_chooser_button_new( l10n_util::GetStringUTF8( @@ -220,9 +212,6 @@ DownloadSection::DownloadSection(Profile* profile) FALSE, FALSE, 0); g_signal_connect(download_ask_for_save_location_checkbox_, "clicked", G_CALLBACK(OnDownloadAskForSaveLocationChanged), this); - accessible_widget_helper_->SetWidgetName( - download_ask_for_save_location_checkbox_, - IDS_OPTIONS_DOWNLOADLOCATION_ASKFORSAVELOCATION); // Option for resetting file handlers. reset_file_handlers_label_ = CreateWrappedLabel( @@ -370,7 +359,6 @@ NetworkSection::NetworkSection(Profile* profile) IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON).c_str()); g_signal_connect(change_proxies_button, "clicked", G_CALLBACK(OnChangeProxiesButtonClicked), this); - // Stick it in an hbox so it doesn't expand to the whole width. GtkWidget* button_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(button_hbox), @@ -538,8 +526,6 @@ class PrivacySection : public OptionsPageBase { // then turning around and saving them again. bool pref_changing_; - scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; - DISALLOW_COPY_AND_ASSIGN(PrivacySection); }; @@ -548,9 +534,6 @@ PrivacySection::PrivacySection(Profile* profile) pref_changing_(true) { page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); - accessible_widget_helper_.reset(new AccessibleWidgetHelper( - page_, profile)); - GtkWidget* section_description_label = CreateWrappedLabel( IDS_OPTIONS_DISABLE_SERVICES); gtk_misc_set_alignment(GTK_MISC(section_description_label), 0, 0); @@ -574,8 +557,6 @@ PrivacySection::PrivacySection(Profile* profile) FALSE, FALSE, 0); g_signal_connect(enable_link_doctor_checkbox_, "clicked", G_CALLBACK(OnEnableLinkDoctorChange), this); - accessible_widget_helper_->SetWidgetName( - enable_link_doctor_checkbox_, IDS_OPTIONS_LINKDOCTOR_PREF); enable_suggest_checkbox_ = CreateCheckButtonWithWrappedLabel( IDS_OPTIONS_SUGGEST_PREF); @@ -583,8 +564,6 @@ PrivacySection::PrivacySection(Profile* profile) FALSE, FALSE, 0); g_signal_connect(enable_suggest_checkbox_, "clicked", G_CALLBACK(OnEnableSuggestChange), this); - accessible_widget_helper_->SetWidgetName( - enable_suggest_checkbox_, IDS_OPTIONS_SUGGEST_PREF); enable_dns_prefetching_checkbox_ = CreateCheckButtonWithWrappedLabel( IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION); @@ -592,9 +571,6 @@ PrivacySection::PrivacySection(Profile* profile) FALSE, FALSE, 0); g_signal_connect(enable_dns_prefetching_checkbox_, "clicked", G_CALLBACK(OnDNSPrefetchingChange), this); - accessible_widget_helper_->SetWidgetName( - enable_dns_prefetching_checkbox_, - IDS_NETWORK_DNS_PREFETCH_ENABLED_DESCRIPTION); enable_safe_browsing_checkbox_ = CreateCheckButtonWithWrappedLabel( IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION); @@ -602,9 +578,6 @@ PrivacySection::PrivacySection(Profile* profile) FALSE, FALSE, 0); g_signal_connect(enable_safe_browsing_checkbox_, "clicked", G_CALLBACK(OnSafeBrowsingChange), this); - accessible_widget_helper_->SetWidgetName( - enable_safe_browsing_checkbox_, - IDS_OPTIONS_SAFEBROWSING_ENABLEPROTECTION); #if defined(GOOGLE_CHROME_BUILD) reporting_enabled_checkbox_ = CreateCheckButtonWithWrappedLabel( @@ -613,8 +586,6 @@ PrivacySection::PrivacySection(Profile* profile) FALSE, FALSE, 0); g_signal_connect(reporting_enabled_checkbox_, "clicked", G_CALLBACK(OnLoggingChange), this); - accessible_widget_helper_->SetWidgetName( - reporting_enabled_checkbox_, IDS_OPTIONS_ENABLE_LOGGING); #endif GtkWidget* cookie_description_label = gtk_label_new( @@ -649,7 +620,6 @@ PrivacySection::PrivacySection(Profile* profile) IDS_OPTIONS_COOKIES_SHOWCOOKIES_WEBSITE_PERMISSIONS).c_str()); g_signal_connect(show_cookies_button, "clicked", G_CALLBACK(OnShowCookiesButtonClicked), this); - // Stick it in an hbox so it doesn't expand to the whole width. GtkWidget* button_hbox = gtk_hbox_new(FALSE, 0); gtk_box_pack_start(GTK_BOX(button_hbox), show_cookies_button, @@ -906,19 +876,13 @@ class SecuritySection : public OptionsPageBase { // then turning around and saving them again. bool pref_changing_; - scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_; - DISALLOW_COPY_AND_ASSIGN(SecuritySection); }; SecuritySection::SecuritySection(Profile* profile) - : OptionsPageBase(profile), - pref_changing_(true) { + : OptionsPageBase(profile), pref_changing_(true) { page_ = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); - accessible_widget_helper_.reset(new AccessibleWidgetHelper( - page_, profile)); - GtkWidget* manage_certificates_label = CreateWrappedLabel( IDS_OPTIONS_CERTIFICATES_LABEL); gtk_misc_set_alignment(GTK_MISC(manage_certificates_label), 0, 0); @@ -945,20 +909,13 @@ SecuritySection::SecuritySection(Profile* profile) rev_checking_enabled_checkbox_ = AddCheckButtonWithWrappedLabel( IDS_OPTIONS_SSL_CHECKREVOCATION, page_, G_CALLBACK(OnRevCheckingEnabledToggled), this); - accessible_widget_helper_->SetWidgetName( - rev_checking_enabled_checkbox_, IDS_OPTIONS_SSL_CHECKREVOCATION); ssl2_enabled_checkbox_ = AddCheckButtonWithWrappedLabel( IDS_OPTIONS_SSL_USESSL2, page_, G_CALLBACK(OnSSL2EnabledToggled), this); - accessible_widget_helper_->SetWidgetName( - ssl2_enabled_checkbox_, IDS_OPTIONS_SSL_USESSL2); ssl3_enabled_checkbox_ = AddCheckButtonWithWrappedLabel( IDS_OPTIONS_SSL_USESSL3, page_, G_CALLBACK(OnSSL3EnabledToggled), this); - accessible_widget_helper_->SetWidgetName( - ssl3_enabled_checkbox_, IDS_OPTIONS_SSL_USESSL3); tls1_enabled_checkbox_ = AddCheckButtonWithWrappedLabel( IDS_OPTIONS_SSL_USETLS1, page_, G_CALLBACK(OnTLS1EnabledToggled), this); - accessible_widget_helper_->SetWidgetName( - tls1_enabled_checkbox_, IDS_OPTIONS_SSL_USETLS1); + rev_checking_enabled_.Init(prefs::kCertRevocationCheckingEnabled, profile->GetPrefs(), this); diff --git a/chrome/browser/gtk/options/content_page_gtk.h b/chrome/browser/gtk/options/content_page_gtk.h index b5ed627a..ba70861 100644 --- a/chrome/browser/gtk/options/content_page_gtk.h +++ b/chrome/browser/gtk/options/content_page_gtk.h @@ -7,9 +7,9 @@ #include <gtk/gtk.h> +#include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/options_page_base.h" #include "chrome/browser/profile.h" -#include "chrome/browser/sync/profile_sync_service.h" #include "chrome/common/pref_member.h" class ContentPageGtk : public OptionsPageBase, diff --git a/chrome/browser/gtk/options/general_page_gtk.cc b/chrome/browser/gtk/options/general_page_gtk.cc index d9ae203..b491c629 100644 --- a/chrome/browser/gtk/options/general_page_gtk.cc +++ b/chrome/browser/gtk/options/general_page_gtk.cc @@ -17,7 +17,6 @@ #include "chrome/browser/session_startup_pref.h" #include "chrome/browser/tab_contents/tab_contents.h" #include "chrome/common/gtk_util.h" -#include "chrome/common/notification_service.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" #include "chrome/common/url_constants.h" @@ -294,7 +293,6 @@ GtkWidget* GeneralPageGtk::InitHomepageGroup() { G_CALLBACK(OnNewTabIsHomePageToggled), this); gtk_box_pack_start(GTK_BOX(homepage_hbox), homepage_use_url_radio_, FALSE, FALSE, 0); - homepage_use_url_entry_ = gtk_entry_new(); g_signal_connect(G_OBJECT(homepage_use_url_entry_), "changed", G_CALLBACK(OnHomepageUseUrlEntryChanged), this); @@ -363,7 +361,6 @@ GtkWidget* GeneralPageGtk::InitDefaultBrowserGroup() { l10n_util::GetStringUTF16(IDS_PRODUCT_NAME)).c_str()); g_signal_connect(G_OBJECT(default_browser_use_as_default_button_), "clicked", G_CALLBACK(OnBrowserUseAsDefaultClicked), this); - gtk_box_pack_start(GTK_BOX(vbox), default_browser_use_as_default_button_, FALSE, FALSE, 0); @@ -380,7 +377,6 @@ void GeneralPageGtk::OnStartupRadioToggled(GtkToggleButton* toggle_button, GeneralPageGtk* general_page) { if (general_page->initializing_) return; - if (!gtk_toggle_button_get_active(toggle_button)) { // When selecting a radio button, we get two signals (one for the old radio // being toggled off, one for the new one being toggled on.) Ignore the diff --git a/chrome/browser/gtk/options/options_window_gtk.cc b/chrome/browser/gtk/options/options_window_gtk.cc index 709ee45..2a12e12 100644 --- a/chrome/browser/gtk/options/options_window_gtk.cc +++ b/chrome/browser/gtk/options/options_window_gtk.cc @@ -8,19 +8,15 @@ #include "app/l10n_util.h" #include "base/message_loop.h" -#include "base/scoped_ptr.h" #include "chrome/browser/browser_list.h" #include "chrome/browser/browser_process.h" #include "chrome/browser/browser_window.h" -#include "chrome/browser/gtk/accessible_widget_helper_gtk.h" #include "chrome/browser/gtk/options/advanced_page_gtk.h" #include "chrome/browser/gtk/options/content_page_gtk.h" #include "chrome/browser/gtk/options/general_page_gtk.h" #include "chrome/browser/profile.h" #include "chrome/browser/window_sizer.h" -#include "chrome/common/accessibility_events.h" #include "chrome/common/gtk_util.h" -#include "chrome/common/notification_service.h" #include "chrome/common/pref_member.h" #include "chrome/common/pref_names.h" #include "chrome/common/pref_service.h" @@ -72,8 +68,6 @@ class OptionsWindowGtk { // The last page the user was on when they opened the Options window. IntegerPrefMember last_selected_page_; - scoped_ptr<AccessibleWidgetHelper> accessibility_widget_helper_; - DISALLOW_COPY_AND_ASSIGN(OptionsWindowGtk); }; @@ -91,7 +85,6 @@ OptionsWindowGtk::OptionsWindowGtk(Profile* profile) general_page_(profile_), content_page_(profile_), advanced_page_(profile_) { - // We don't need to observe changes in this value. last_selected_page_.Init(prefs::kOptionsWindowLastTabIndex, g_browser_process->local_state(), NULL); @@ -112,9 +105,6 @@ OptionsWindowGtk::OptionsWindowGtk(Profile* profile) gtk_box_set_spacing(GTK_BOX(GTK_DIALOG(dialog_)->vbox), gtk_util::kContentAreaSpacing); - accessibility_widget_helper_.reset(new AccessibleWidgetHelper( - dialog_, profile)); - notebook_ = gtk_notebook_new(); #if defined(OS_CHROMEOS) @@ -258,30 +248,10 @@ void ShowOptionsWindow(OptionsPage page, OptionsGroup highlight_group, Profile* profile) { DCHECK(profile); - // If there's already an existing options window, activate it and switch to // the specified page. if (!options_window) { - // Creating and initializing a bunch of controls generates a bunch of - // spurious events as control values change. Temporarily suppress - // accessibility events until the window is created. - profile->PauseAccessibilityEvents(); - - // Create the options window. options_window = new OptionsWindowGtk(profile); - - // Resume accessibility events. - profile->ResumeAccessibilityEvents(); } options_window->ShowOptionsPage(page, highlight_group); - - std::string name = l10n_util::GetStringFUTF8( - IDS_OPTIONS_DIALOG_TITLE, - WideToUTF16(l10n_util::GetString(IDS_PRODUCT_NAME))); - AccessibilityWindowInfo info(profile, name); - - NotificationService::current()->Notify( - NotificationType::ACCESSIBILITY_WINDOW_OPENED, - Source<Profile>(profile), - Details<AccessibilityWindowInfo>(&info)); } |