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

Side by Side Diff: ui/app_list/app_list_menu.h

Issue 12789010: [win] Change app launcher profile indicator to be a menu. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Feedback Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_APP_LIST_APP_LIST_MENU_H_
6 #define UI_APP_LIST_APP_LIST_MENU_H_
7
8 #include "ui/base/models/simple_menu_model.h"
9
10 namespace app_list {
11
12 class AppListViewDelegate;
13
14 // Menu for the app list. This is shown in the top right hand corner of the
15 // app list.
16 class AppListMenu : public ui::SimpleMenuModel::Delegate {
17 public:
18 enum AppListMenuCommands {
19 CURRENT_USER,
20 SHOW_SETTINGS,
21 SHOW_FEEDBACK,
22 };
23
24 explicit AppListMenu(AppListViewDelegate* delegate);
25 virtual ~AppListMenu();
26
27 protected:
28 ui::SimpleMenuModel* menu_model() { return &menu_model_; }
29
30 private:
31 void InitMenu();
32
33 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
34 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
35 virtual bool GetAcceleratorForCommandId(
36 int command_id,
37 ui::Accelerator* accelerator) OVERRIDE;
38 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
39
40 ui::SimpleMenuModel menu_model_;
41 AppListViewDelegate* delegate_;
42
43 DISALLOW_COPY_AND_ASSIGN(AppListMenu);
44 };
45
46 } // namespace app_list
47
48 #endif // UI_APP_LIST_APP_LIST_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698