Chromium Code Reviews| 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 5cbcb617359b115af693793aa9c098f77ebba766..b8a81c293e8187c7c7d33903cc4b0aaa0a783c04 100644 |
| --- a/chrome/browser/ui/views/profiles/new_avatar_button.h |
| +++ b/chrome/browser/ui/views/profiles/new_avatar_button.h |
| @@ -11,6 +11,7 @@ |
| #include "chrome/browser/ui/avatar_button_error_controller_delegate.h" |
| #include "chrome/browser/ui/views/profiles/avatar_button_style.h" |
| #include "ui/views/controls/button/label_button.h" |
| +#include "ui/views/widget/widget_observer.h" |
| class AvatarButtonDelegate; |
| class Profile; |
| @@ -18,19 +19,21 @@ class Profile; |
| // Avatar button that displays the active profile's name in the caption area. |
| class NewAvatarButton : public views::LabelButton, |
| public AvatarButtonErrorControllerDelegate, |
| - public ProfileAttributesStorage::Observer { |
| + public ProfileAttributesStorage::Observer, |
| + public views::WidgetObserver { |
| public: |
| NewAvatarButton(AvatarButtonDelegate* delegate, |
| AvatarButtonStyle button_style, |
| Profile* profile); |
| ~NewAvatarButton() override; |
| - // Views::LabelButton |
| + // views::LabelButton |
| bool OnMousePressed(const ui::MouseEvent& event) override; |
| void OnMouseReleased(const ui::MouseEvent& event) override; |
| - |
| - // Views |
| void OnGestureEvent(ui::GestureEvent* event) override; |
| + SkColor GetInkDropBaseColor() const override; |
| + std::unique_ptr<views::InkDropMask> CreateInkDropMask() const override; |
| + void NotifyClick(const ui::Event& event) override; |
| private: |
| friend class ProfileChooserViewExtensionsTest; |
| @@ -47,6 +50,9 @@ class NewAvatarButton : public views::LabelButton, |
| void OnProfileSupervisedUserIdChanged( |
| const base::FilePath& profile_path) override; |
| + // views::WidgetObserver |
| + void OnWidgetClosing(views::Widget* widget) override; |
|
Peter Kasting
2017/04/27 02:13:18
Nit: Per recent chromium-dev discussion, make over
|
| + |
| // Called when the profile info cache or signin/sync error has changed, which |
| // means we might have to update the icon/text of the button. |
| void Update(); |