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

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

Issue 7054031: Mac: Use cross-platform menu model for profile button. (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.cc
diff --git a/chrome/browser/ui/views/profile_menu_button.cc b/chrome/browser/ui/views/profile_menu_button.cc
index cfc5928a539b23b1d7f2f54ed5da79ab94c932b3..64e8b4c86dddf105114b37001cea13a6f234eafc 100644
--- a/chrome/browser/ui/views/profile_menu_button.cc
+++ b/chrome/browser/ui/views/profile_menu_button.cc
@@ -4,7 +4,6 @@
#include "chrome/browser/ui/views/profile_menu_button.h"
-#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/ui/profile_menu_model.h"
#include "ui/base/text/text_elider.h"
#include "ui/gfx/color_utils.h"
@@ -37,7 +36,7 @@ ProfileMenuButton::ProfileMenuButton(const std::wstring& text, Profile* profile)
SetEnabledColor(kTextEnabled);
SetHighlightColor(kTextHighlighted);
- profile_menu_model_.reset(new ProfileMenuModel(this));
+ profile_menu_model_.reset(new ProfileMenuModel);
menu_.reset(new views::Menu2(profile_menu_model_.get()));
}
@@ -48,31 +47,6 @@ void ProfileMenuButton::SetText(const std::wstring& text) {
font(), kMaxTextWidth, false)));
}
-// ui::SimpleMenuModel::Delegate implementation
-bool ProfileMenuButton::IsCommandIdChecked(int command_id) const {
- return false;
-}
-
-bool ProfileMenuButton::IsCommandIdEnabled(int command_id) const {
- return true;
-}
-
-bool ProfileMenuButton::GetAcceleratorForCommandId(int command_id,
- ui::Accelerator* accelerator) {
- return false;
-}
-
-void ProfileMenuButton::ExecuteCommand(int command_id) {
- switch (command_id) {
- case ProfileMenuModel::COMMAND_CREATE_NEW_PROFILE:
- ProfileManager::CreateMultiProfileAsync();
- break;
- default:
- NOTREACHED();
- break;
- }
-}
-
// views::ViewMenuDelegate implementation
void ProfileMenuButton::RunMenu(views::View* source, const gfx::Point &pt) {
gfx::Point menu_point(pt.x(), pt.y() + kMenuDisplayOffset);
« chrome/browser/ui/profile_menu_model.h ('K') | « chrome/browser/ui/views/profile_menu_button.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698