diff options
author | zork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 19:01:13 +0000 |
---|---|---|
committer | zork@chromium.org <zork@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-12 19:01:13 +0000 |
commit | eee7df547d7548aa880d5dc3fd4b73a4b4e38679 (patch) | |
tree | e84b71d95e7c03be91152099eb8088dd9f66219a /chrome/browser/gtk/options/content_page_gtk.h | |
parent | 5a2fb0052ba3649072a6a943474032e0f750c136 (diff) | |
download | chromium_src-eee7df547d7548aa880d5dc3fd4b73a4b4e38679.zip chromium_src-eee7df547d7548aa880d5dc3fd4b73a4b4e38679.tar.gz chromium_src-eee7df547d7548aa880d5dc3fd4b73a4b4e38679.tar.bz2 |
Add the sync options to the preferences dialog on Linux.
BUG=none
TEST=With bookmark sync enabled, go to Wrench Menu->Sync my bookmarks. Ensure that the Bookmark Sync section is there and useable.
Review URL: http://codereview.chromium.org/385026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31805 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 | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/chrome/browser/gtk/options/content_page_gtk.h b/chrome/browser/gtk/options/content_page_gtk.h index a4d67f2..ba70861 100644 --- a/chrome/browser/gtk/options/content_page_gtk.h +++ b/chrome/browser/gtk/options/content_page_gtk.h @@ -7,11 +7,13 @@ #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/common/pref_member.h" -class ContentPageGtk : public OptionsPageBase { +class ContentPageGtk : public OptionsPageBase, + public ProfileSyncServiceObserver { public: explicit ContentPageGtk(Profile* profile); ~ContentPageGtk(); @@ -20,7 +22,13 @@ class ContentPageGtk : public OptionsPageBase { return page_; } + // ProfileSyncServiceObserver method. + virtual void OnStateChanged(); + private: + // Updates various sync controls based on the current sync state. + void UpdateSyncControls(); + // Overridden from OptionsPageBase. virtual void NotifyPrefChanged(const std::wstring* pref_name); @@ -37,6 +45,7 @@ class ContentPageGtk : public OptionsPageBase { GtkWidget* InitFormAutofillGroup(); GtkWidget* InitBrowsingDataGroup(); GtkWidget* InitThemesGroup(); + GtkWidget* InitSyncGroup(); // Callback for import button. static void OnImportButtonClicked(GtkButton* widget, ContentPageGtk* page); @@ -73,6 +82,19 @@ class ContentPageGtk : public OptionsPageBase { static void OnAutofillRadioToggled(GtkToggleButton* widget, ContentPageGtk* page); + // Callback for sync start/stop button. + static void OnSyncStartStopButtonClicked(GtkButton* widget, + ContentPageGtk* page); + + // Callback for sync action link. + static void OnSyncActionLinkClicked(GtkButton* widget, + ContentPageGtk* page); + + // Callback for stop sync dialog. + static void OnStopSyncDialogResponse(GtkWidget* widget, + int response, + ContentPageGtk* page); + // Widgets for the Password saving group. GtkWidget* passwords_asktosave_radio_; GtkWidget* passwords_neversave_radio_; @@ -89,6 +111,13 @@ class ContentPageGtk : public OptionsPageBase { GtkWidget* gtk_theme_button_; #endif + // Widgets for the Sync group. + GtkWidget* sync_status_label_background_; + GtkWidget* sync_status_label_; + GtkWidget* sync_action_link_background_; + GtkWidget* sync_action_link_; + GtkWidget* sync_start_stop_button_; + // The parent GtkTable widget GtkWidget* page_; @@ -103,6 +132,10 @@ class ContentPageGtk : public OptionsPageBase { NotificationRegistrar registrar_; + // Cached pointer to ProfileSyncService, if it exists. Kept up to date + // and NULL-ed out on destruction. + ProfileSyncService* sync_service_; + DISALLOW_COPY_AND_ASSIGN(ContentPageGtk); }; |