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

Unified Diff: ui/app_list/app_list_menu.h

Issue 20656002: Add profile selector menu to app list. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: undo app_list_service_mac changes Created 7 years, 5 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: ui/app_list/app_list_menu.h
diff --git a/ui/app_list/app_list_menu.h b/ui/app_list/app_list_menu.h
index ff4be49e4c59f89d9940ae3ea88ed9f412d76cd9..ec1dcac78032e8e77c075717c87345d7deaf6b5a 100644
--- a/ui/app_list/app_list_menu.h
+++ b/ui/app_list/app_list_menu.h
@@ -5,8 +5,14 @@
#ifndef UI_APP_LIST_APP_LIST_MENU_H_
#define UI_APP_LIST_APP_LIST_MENU_H_
+#include <vector>
+
#include "ui/base/models/simple_menu_model.h"
+namespace ui {
+struct AvatarMenuItemModel;
+}
+
namespace app_list {
class AppListViewDelegate;
@@ -21,15 +27,20 @@ class AppListMenu : public ui::SimpleMenuModel::Delegate {
SHOW_SETTINGS,
SHOW_HELP,
SHOW_FEEDBACK,
+ // |SELECT_PROFILE| must remain the last enum because values greater than
+ // |SELECT_PROFILE| are used to indicate a profile index.
+ SELECT_PROFILE,
};
- explicit AppListMenu(AppListViewDelegate* delegate);
+ explicit AppListMenu(
tapted 2013/07/31 05:43:53 nit: explicit not needed
calamity 2013/08/01 08:35:45 Done.
+ AppListViewDelegate* delegate,
+ std::vector<ui::AvatarMenuItemModel*>& avatar_menu_items);
tapted 2013/07/31 05:43:53 can't pass a non-const reference in Chrome
tapted 2013/07/31 05:43:53 I think it's convention in the current app list mo
calamity 2013/08/01 08:35:45 Done.
calamity 2013/08/01 08:35:45 Done.
virtual ~AppListMenu();
ui::SimpleMenuModel* menu_model() { return &menu_model_; }
private:
- void InitMenu();
+ void InitMenu(std::vector<ui::AvatarMenuItemModel*>& avatar_menu_items);
virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
@@ -39,6 +50,7 @@ class AppListMenu : public ui::SimpleMenuModel::Delegate {
virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
ui::SimpleMenuModel menu_model_;
+ ui::SimpleMenuModel profiles_model_;
AppListViewDelegate* delegate_;
DISALLOW_COPY_AND_ASSIGN(AppListMenu);

Powered by Google App Engine
This is Rietveld 408576698