Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1661)

Unified Diff: chrome/browser/ui/views/profile_chooser_view.h

Issue 58183002: Auto refresh avatar bubble after adding a secondary account (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move initialization of view_mode_ to constructor Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/views/profile_chooser_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/profile_chooser_view.h
diff --git a/chrome/browser/ui/views/profile_chooser_view.h b/chrome/browser/ui/views/profile_chooser_view.h
index 91a04fbcc3e70d202610c4ea0f2bdacc1462fa83..5c294616fa5fe11753352b8b26e868aef39d9681 100644
--- a/chrome/browser/ui/views/profile_chooser_view.h
+++ b/chrome/browser/ui/views/profile_chooser_view.h
@@ -10,6 +10,7 @@
#include "chrome/browser/profiles/avatar_menu.h"
#include "chrome/browser/profiles/avatar_menu_observer.h"
+#include "google_apis/gaia/oauth2_token_service.h"
#include "ui/views/bubble/bubble_delegate.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/link_listener.h"
@@ -33,7 +34,8 @@ class ProfileItemView;
class ProfileChooserView : public views::BubbleDelegateView,
public views::ButtonListener,
public views::LinkListener,
- public AvatarMenuObserver {
+ public AvatarMenuObserver,
+ public OAuth2TokenService::Observer {
public:
// Shows the bubble if one is not already showing. This allows us to easily
// make a button toggle the bubble on and off when clicked: we unconditionally
@@ -90,6 +92,10 @@ class ProfileChooserView : public views::BubbleDelegateView,
// AvatarMenuObserver:
virtual void OnAvatarMenuChanged(AvatarMenu* avatar_menu) OVERRIDE;
+ // OAuth2TokenService::Observer overrides.
+ virtual void OnRefreshTokenAvailable(const std::string& account_id) OVERRIDE;
+ virtual void OnRefreshTokenRevoked(const std::string& account_id) OVERRIDE;
+
static ProfileChooserView* profile_bubble_;
static bool close_on_deactivate_;
@@ -134,6 +140,9 @@ class ProfileChooserView : public views::BubbleDelegateView,
views::TextButton* users_button_;
views::LabelButton* add_account_button_;
+ // Active view mode.
+ BubbleViewMode view_mode_;
+
DISALLOW_COPY_AND_ASSIGN(ProfileChooserView);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/profile_chooser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698