Index: chrome/browser/ui/views/profiles/new_avatar_button.h |
diff --git a/chrome/browser/ui/views/profiles/new_avatar_button.h b/chrome/browser/ui/views/profiles/new_avatar_button.h |
index 917a696edbb905e3b1e08c17f2db0c9ec7e206c4..76c40bfa09a9b56cca9f9a50c0654848c8e7391f 100644 |
--- a/chrome/browser/ui/views/profiles/new_avatar_button.h |
+++ b/chrome/browser/ui/views/profiles/new_avatar_button.h |
@@ -7,12 +7,12 @@ |
#include "chrome/browser/profiles/profile_info_cache_observer.h" |
#include "components/signin/core/browser/signin_error_controller.h" |
-#include "ui/views/controls/button/menu_button.h" |
+#include "ui/views/controls/button/label_button.h" |
class Browser; |
// Avatar button that displays the active profile's name in the caption area. |
-class NewAvatarButton : public views::MenuButton, |
+class NewAvatarButton : public views::LabelButton, |
public ProfileInfoCacheObserver, |
public SigninErrorController::Observer { |
public: |
@@ -23,12 +23,11 @@ class NewAvatarButton : public views::MenuButton, |
}; |
NewAvatarButton(views::ButtonListener* listener, |
- const base::string16& profile_name, |
AvatarButtonStyle button_style, |
Browser* browser); |
virtual ~NewAvatarButton(); |
- // Views::MenuButton |
+ // Views::LabelButton |
virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; |
@@ -55,11 +54,19 @@ class NewAvatarButton : public views::MenuButton, |
virtual void OnErrorChanged() OVERRIDE; |
// Called when the profile info cache has changed, which means we might |
- // have to re-display the profile name. |
+ // have to update the icon/text of the button. |
void UpdateAvatarButtonAndRelayoutParent(); |
Browser* browser_; |
+ // Whether the signed in profile has an authentication error. Used to display |
+ // an error icon next to the button text. |
+ bool has_auth_error_; |
+ |
+ // The icon displayed instead of the profile name in the local profile case. |
+ // Different assets are used depending on the OS version. |
+ gfx::ImageSkia generic_avatar_; |
+ |
// This is used to check if the bubble was showing during the mouse pressed |
// event. If this is true then the mouse released event is ignored to prevent |
// the bubble from reshowing. |