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

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

Issue 7045023: Simplify ProfileMenuButton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 9 years, 7 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
Index: chrome/browser/ui/views/profile_menu_button.h
diff --git a/chrome/browser/ui/views/profile_menu_button.h b/chrome/browser/ui/views/profile_menu_button.h
index aca1db703a8bc0c1045e21018f1b49b58d0aaedd..e9161fa388c799fd01220153621769aef4e00790 100644
--- a/chrome/browser/ui/views/profile_menu_button.h
+++ b/chrome/browser/ui/views/profile_menu_button.h
@@ -11,6 +11,7 @@
#include "base/compiler_specific.h"
#include "ui/base/models/simple_menu_model.h"
#include "views/controls/button/menu_button.h"
+#include "views/controls/menu/view_menu_delegate.h"
class Profile;
class ProfileMenuModel;
@@ -33,6 +34,7 @@ class Menu2;
// underneath that displays the profile tag.
class ProfileMenuButton : public views::MenuButton,
+ public views::ViewMenuDelegate,
public ui::SimpleMenuModel::Delegate {
public:
// DefaultActiveTextShadow is a darkened blue color that works with Windows
@@ -45,10 +47,7 @@ class ProfileMenuButton : public views::MenuButton,
// Space between window controls and end of profile tag.
static const int kProfileTagHorizontalSpacing = 5;
- ProfileMenuButton(views::ButtonListener* listener,
- const std::wstring& text,
- views::ViewMenuDelegate* menu_delegate,
- Profile* profile);
+ ProfileMenuButton(const std::wstring& text, Profile* profile);
virtual ~ProfileMenuButton();
@@ -62,9 +61,10 @@ class ProfileMenuButton : public views::MenuButton,
int command_id, ui::Accelerator* accelerator) OVERRIDE;
virtual void ExecuteCommand(int command_id) OVERRIDE;
- void RunMenuAt(const gfx::Point& point);
-
private:
+ // Overridden from views::ViewMenuDelegate:
+ virtual void RunMenu(views::View* source, const gfx::Point& pt) OVERRIDE;
+
scoped_ptr<views::Menu2> menu_;
scoped_ptr<ProfileMenuModel> profile_menu_model_;
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/ui/views/profile_menu_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698