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

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

Issue 8138019: Don't reopen avatar bubble view on second click (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed review comments Created 9 years, 2 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/avatar_menu_button.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/avatar_menu_button.h
diff --git a/chrome/browser/ui/views/avatar_menu_button.h b/chrome/browser/ui/views/avatar_menu_button.h
index de595c261c23b2667c5618e9317411d642d65d4a..329d8fb55adf4bd2d95f80b74f4418314bdc05bc 100644
--- a/chrome/browser/ui/views/avatar_menu_button.h
+++ b/chrome/browser/ui/views/avatar_menu_button.h
@@ -9,6 +9,7 @@
#include <string>
#include "base/compiler_specific.h"
+#include "chrome/browser/ui/views/bubble/bubble.h"
#include "ui/base/models/simple_menu_model.h"
#include "views/controls/button/menu_button.h"
#include "views/controls/menu/view_menu_delegate.h"
@@ -24,7 +25,8 @@ class Browser;
// The button can optionally have a menu attached to it.
class AvatarMenuButton : public views::MenuButton,
- public views::ViewMenuDelegate {
+ public views::ViewMenuDelegate,
+ public Bubble::Observer {
public:
// Creates a new button. If |has_menu| is true then clicking on the button
// will cause the profile menu to be displayed.
@@ -43,7 +45,11 @@ class AvatarMenuButton : public views::MenuButton,
// views::ViewMenuDelegate
virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE;
+ // Bubble::Observer implementation.
+ virtual void OnBubbleClosing();
+
Browser* browser_;
+ Bubble* bubble_;
bool has_menu_;
bool set_taskbar_decoration_;
scoped_ptr<ui::MenuModel> menu_model_;
« no previous file with comments | « no previous file | chrome/browser/ui/views/avatar_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698