diff options
author | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-20 06:21:20 +0000 |
---|---|---|
committer | mhm@chromium.org <mhm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-20 06:21:20 +0000 |
commit | 481f33edad1063047b34c20cc6c2ca6f3ee8bdec (patch) | |
tree | 1fb621bca51abb284461d0ecb13aa3a943ed1856 /chrome/browser/gtk/options/content_page_gtk.h | |
parent | 7747414c115302f2dad064079da3a7c5495901cb (diff) | |
download | chromium_src-481f33edad1063047b34c20cc6c2ca6f3ee8bdec.zip chromium_src-481f33edad1063047b34c20cc6c2ca6f3ee8bdec.tar.gz chromium_src-481f33edad1063047b34c20cc6c2ca6f3ee8bdec.tar.bz2 |
Add Personal Stuff tab page to Options in Linux.
Following the same approach as the general tab page..
BUG=11507
TEST=The Personal stuff tab is fully functioning, the prefs save correctly.
Review URL: http://codereview.chromium.org/125105
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18892 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/options/content_page_gtk.h')
-rw-r--r-- | chrome/browser/gtk/options/content_page_gtk.h | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/chrome/browser/gtk/options/content_page_gtk.h b/chrome/browser/gtk/options/content_page_gtk.h new file mode 100644 index 0000000..95b044e0 --- /dev/null +++ b/chrome/browser/gtk/options/content_page_gtk.h @@ -0,0 +1,78 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ +#define CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ + +#include <gtk/gtk.h> + +#include "chrome/browser/options_page_base.h" +#include "chrome/browser/profile.h" +#include "chrome/common/pref_member.h" + +class ContentPageGtk : public OptionsPageBase { + public: + explicit ContentPageGtk(Profile* profile); + ~ContentPageGtk(); + + GtkWidget* get_page_widget() const { + return page_; + } + + private: + // Overridden from OptionsPageBase. + virtual void NotifyPrefChanged(const std::wstring* pref_name); + + // Initialize the option group widgets, return their container. + GtkWidget* InitPasswordSavingGroup(); + GtkWidget* InitFormAutofillGroup(); + GtkWidget* InitBrowsingDataGroup(); + GtkWidget* InitThemesGroup(); + + // Callback for import button. + static void OnImportButtonClicked(GtkButton* widget, ContentPageGtk* page); + + // Callback for clear data button. + static void OnClearBrowsingDataButtonClicked(GtkButton* widget, + ContentPageGtk* page); + + // Callback for reset default theme button. + static void OnResetDefaultThemeButtonClicked(GtkButton* widget, + ContentPageGtk* page); + + // Callback for passwords exceptions button. + static void OnPasswordsExceptionsButtonClicked(GtkButton* widget, + ContentPageGtk* page); + + // Callback for password radio buttons. + static void OnPasswordRadioToggled(GtkToggleButton* widget, + ContentPageGtk* page); + + // Callback for form autofill radio buttons. + static void OnAutofillRadioToggled(GtkToggleButton* widget, + ContentPageGtk* page); + + // Widgets for the Password saving group. + GtkWidget* passwords_asktosave_radio_; + GtkWidget* passwords_neversave_radio_; + + // Widget for the Form Autofill group. + GtkWidget* form_autofill_asktosave_radio_; + GtkWidget* form_autofill_neversave_radio_; + + // The parent GtkTable widget + GtkWidget* page_; + + // Pref members. + BooleanPrefMember ask_to_save_passwords_; + BooleanPrefMember ask_to_save_form_autofill_; + + // Flag to ignore gtk callbacks while we are loading prefs, to avoid + // then turning around and saving them again. + bool initializing_; + + DISALLOW_COPY_AND_ASSIGN(ContentPageGtk); +}; + +#endif // CHROME_BROWSER_GTK_OPTIONS_CONTENT_PAGE_GTK_H_ |