diff options
author | idana@chromium.org <idana@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 02:17:22 +0000 |
---|---|---|
committer | idana@chromium.org <idana@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-11 02:17:22 +0000 |
commit | fb68e2aa45a49fb36cf0be8a0188955f610554f0 (patch) | |
tree | e8f8bca9d0487833cc340fd9d8610bf2ba7e62fe /chrome/browser/views/bookmark_bar_view.h | |
parent | 1f97a11d47048f09134e36265661c1082d1f82d3 (diff) | |
download | chromium_src-fb68e2aa45a49fb36cf0be8a0188955f610554f0.zip chromium_src-fb68e2aa45a49fb36cf0be8a0188955f610554f0.tar.gz chromium_src-fb68e2aa45a49fb36cf0be8a0188955f610554f0.tar.bz2 |
Added a button to the bookmark bar which shows up when the sync
login credentials expire and we need the user to re-enter their
password.
Review URL: http://codereview.chromium.org/164278
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/bookmark_bar_view.h')
-rw-r--r-- | chrome/browser/views/bookmark_bar_view.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/chrome/browser/views/bookmark_bar_view.h b/chrome/browser/views/bookmark_bar_view.h index cac9b9f..b82b669 100644 --- a/chrome/browser/views/bookmark_bar_view.h +++ b/chrome/browser/views/bookmark_bar_view.h @@ -9,6 +9,7 @@ #include "chrome/browser/bookmarks/bookmark_drag_data.h" #include "chrome/browser/bookmarks/bookmark_model_observer.h" #include "chrome/browser/extensions/extensions_service.h" +#include "chrome/browser/sync/profile_sync_service.h" #include "chrome/browser/views/bookmark_menu_controller_views.h" #include "chrome/common/notification_registrar.h" #include "views/controls/button/menu_button.h" @@ -33,6 +34,9 @@ class MenuItemView; // waits until the HistoryService for the profile has been loaded before // creating the BookmarkModel. class BookmarkBarView : public views::View, +#ifdef CHROME_PERSONALIZATION + public ProfileSyncServiceObserver, +#endif public BookmarkModelObserver, public views::ViewMenuDelegate, public views::ButtonListener, @@ -102,6 +106,11 @@ class BookmarkBarView : public views::View, virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); virtual void SetAccessibleName(const std::wstring& name); +#ifdef CHROME_PERSONALIZATION + // ProfileSyncServiceObserver method. + virtual void OnStateChanged(); +#endif + // Called when fullscreen mode toggles on or off; this affects our layout. void OnFullscreenToggled(bool fullscreen); @@ -383,6 +392,15 @@ class BookmarkBarView : public views::View, // Updates the colors for all the buttons in the bookmarks bar. void UpdateButtonColors(); +#ifdef CHROME_PERSONALIZATION + // Determines whether the sync error button should appear on the bookmarks + // bar. + bool ShouldShowSyncErrorButton(); + + // Creates the sync error button and adds it as a child view. + views::TextButton* CreateSyncErrorButton(); +#endif + NotificationRegistrar registrar_; Profile* profile_; @@ -415,6 +433,15 @@ class BookmarkBarView : public views::View, // Used to track drops on the bookmark bar view. scoped_ptr<DropInfo> drop_info_; +#ifdef CHROME_PERSONALIZATION + // The sync re-login indicator which appears when the user needs to re-enter + // credentials in order to continue syncing. + views::TextButton* sync_error_button_; + + // A pointer to the ProfileSyncService instance if one exists. + ProfileSyncService* sync_service_; +#endif + // Visible if not all the bookmark buttons fit. views::MenuButton* overflow_button_; |