| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #ifndef CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ | 5 #ifndef CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ |
| 6 #define CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ | 6 #define CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ |
| 7 | 7 |
| 8 #include <gtk/gtk.h> | 8 #include <gtk/gtk.h> |
| 9 | 9 |
| 10 #include "chrome/browser/options_page_base.h" | 10 #include "chrome/browser/options_page_base.h" |
| 11 #include "chrome/browser/profile.h" | 11 #include "chrome/browser/profile.h" |
| 12 #include "chrome/common/pref_member.h" | 12 #include "chrome/common/pref_member.h" |
| 13 | 13 |
| 14 class ContentPageGtk : public OptionsPageBase { | 14 class ContentPageGtk : public OptionsPageBase { |
| 15 public: | 15 public: |
| 16 explicit ContentPageGtk(Profile* profile); | 16 explicit ContentPageGtk(Profile* profile); |
| 17 ~ContentPageGtk(); | 17 ~ContentPageGtk(); |
| 18 | 18 |
| 19 GtkWidget* get_page_widget() const { | 19 GtkWidget* get_page_widget() const { |
| 20 return page_; | 20 return page_; |
| 21 } | 21 } |
| 22 | 22 |
| 23 private: | 23 private: |
| 24 // Overridden from OptionsPageBase. | 24 // Overridden from OptionsPageBase. |
| 25 virtual void NotifyPrefChanged(const std::wstring* pref_name); | 25 virtual void NotifyPrefChanged(const std::wstring* pref_name); |
| 26 | 26 |
| 27 // Overridden from OptionsPageBase. |
| 28 virtual void Observe(NotificationType type, |
| 29 const NotificationSource& source, |
| 30 const NotificationDetails& details); |
| 31 |
| 32 // Update content area after a theme changed. |
| 33 void ObserveThemeChanged(); |
| 34 |
| 27 // Initialize the option group widgets, return their container. | 35 // Initialize the option group widgets, return their container. |
| 28 GtkWidget* InitPasswordSavingGroup(); | 36 GtkWidget* InitPasswordSavingGroup(); |
| 29 GtkWidget* InitFormAutofillGroup(); | 37 GtkWidget* InitFormAutofillGroup(); |
| 30 GtkWidget* InitBrowsingDataGroup(); | 38 GtkWidget* InitBrowsingDataGroup(); |
| 31 GtkWidget* InitThemesGroup(); | 39 GtkWidget* InitThemesGroup(); |
| 32 | 40 |
| 33 // Callback for import button. | 41 // Callback for import button. |
| 34 static void OnImportButtonClicked(GtkButton* widget, ContentPageGtk* page); | 42 static void OnImportButtonClicked(GtkButton* widget, ContentPageGtk* page); |
| 35 | 43 |
| 36 // Callback for clear data button. | 44 // Callback for clear data button. |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 GtkWidget* passwords_asktosave_radio_; | 77 GtkWidget* passwords_asktosave_radio_; |
| 70 GtkWidget* passwords_neversave_radio_; | 78 GtkWidget* passwords_neversave_radio_; |
| 71 | 79 |
| 72 // Widgets for the Form Autofill group. | 80 // Widgets for the Form Autofill group. |
| 73 GtkWidget* form_autofill_asktosave_radio_; | 81 GtkWidget* form_autofill_asktosave_radio_; |
| 74 GtkWidget* form_autofill_neversave_radio_; | 82 GtkWidget* form_autofill_neversave_radio_; |
| 75 | 83 |
| 76 // Widgets for the Appearance group. | 84 // Widgets for the Appearance group. |
| 77 GtkWidget* system_title_bar_show_radio_; | 85 GtkWidget* system_title_bar_show_radio_; |
| 78 GtkWidget* system_title_bar_hide_radio_; | 86 GtkWidget* system_title_bar_hide_radio_; |
| 87 GtkWidget* themes_reset_button_; |
| 88 #if defined(TOOLKIT_GTK) |
| 89 GtkWidget* gtk_theme_button_; |
| 90 #endif |
| 79 | 91 |
| 80 // The parent GtkTable widget | 92 // The parent GtkTable widget |
| 81 GtkWidget* page_; | 93 GtkWidget* page_; |
| 82 | 94 |
| 83 // Pref members. | 95 // Pref members. |
| 84 BooleanPrefMember ask_to_save_passwords_; | 96 BooleanPrefMember ask_to_save_passwords_; |
| 85 BooleanPrefMember ask_to_save_form_autofill_; | 97 BooleanPrefMember ask_to_save_form_autofill_; |
| 86 BooleanPrefMember use_custom_chrome_frame_; | 98 BooleanPrefMember use_custom_chrome_frame_; |
| 87 | 99 |
| 88 // Flag to ignore gtk callbacks while we are loading prefs, to avoid | 100 // Flag to ignore gtk callbacks while we are loading prefs, to avoid |
| 89 // then turning around and saving them again. | 101 // then turning around and saving them again. |
| 90 bool initializing_; | 102 bool initializing_; |
| 91 | 103 |
| 104 NotificationRegistrar registrar_; |
| 105 |
| 92 DISALLOW_COPY_AND_ASSIGN(ContentPageGtk); | 106 DISALLOW_COPY_AND_ASSIGN(ContentPageGtk); |
| 93 }; | 107 }; |
| 94 | 108 |
| 95 #endif // CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ | 109 #endif // CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ |
| OLD | NEW |