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 60c954de4c31aa7a673de3d0425e1a3c9d2e5414..93f5856e2c3300b9190608484ec8113168235eb2 100644 |
--- a/chrome/browser/ui/views/profiles/new_avatar_button.h |
+++ b/chrome/browser/ui/views/profiles/new_avatar_button.h |
@@ -28,6 +28,13 @@ class NewAvatarButton : public views::MenuButton, |
Browser* browser); |
virtual ~NewAvatarButton(); |
+ virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; |
msw
2014/08/20 21:12:36
nit: add comment "// views::MenuButton:"
Mike Lerman
2014/08/21 15:15:36
Done.
|
+ |
+ // If this is the second click on the avatar button then the avatar button was |
+ // showing on the pressed event and is hidden now. Prevent the bubble from |
+ // reshowing. |
+ bool IsMouseReleaseActionSuppressed(); |
+ |
private: |
friend class NewAvatarMenuButtonTest; |
friend class ProfileChooserViewBrowserTest; |
@@ -54,6 +61,11 @@ class NewAvatarButton : public views::MenuButton, |
Browser* browser_; |
+ // This is used to check if the profile chooser view was showing during the |
msw
2014/08/20 21:12:36
nit: s/profile chooser view/bubble/, ditto below f
Mike Lerman
2014/08/21 15:15:36
Done.
|
+ // mouse pressed event. If this is true then the mouse released event is |
+ // ignored to prevent the profile chooser from reshowing. |
+ bool suppress_mouse_released_action_; |
+ |
DISALLOW_COPY_AND_ASSIGN(NewAvatarButton); |
}; |