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

Unified Diff: chrome/browser/ui/views/profiles/new_avatar_button.h

Issue 488253002: Avatar Bubble doesn't re-pop when trying to click it away. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: msw nits Created 6 years, 4 months 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/profiles/new_avatar_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..76e3ac1b1682802f4385b86569c544a5595a4894 100644
--- a/chrome/browser/ui/views/profiles/new_avatar_button.h
+++ b/chrome/browser/ui/views/profiles/new_avatar_button.h
@@ -28,6 +28,10 @@ class NewAvatarButton : public views::MenuButton,
Browser* browser);
virtual ~NewAvatarButton();
+ // Views::MenuButton
+ virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
+ virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
+
private:
friend class NewAvatarMenuButtonTest;
friend class ProfileChooserViewBrowserTest;
@@ -54,6 +58,11 @@ class NewAvatarButton : public views::MenuButton,
Browser* browser_;
+ // 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.
+ bool suppress_mouse_released_action_;
+
DISALLOW_COPY_AND_ASSIGN(NewAvatarButton);
};
« no previous file with comments | « no previous file | chrome/browser/ui/views/profiles/new_avatar_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698