OLD | NEW |
---|---|
(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 class AppListMenu : ui::SimpleMenuModel::Delegate { | |
tapted
2013/03/20 07:44:20
Should probably have a class comment
tapted
2013/03/20 07:44:20
Should this be AppListMenuModel ? It also seems co
benwells
2013/03/20 08:43:34
As I don't need to override anything in SimpleMenu
benwells
2013/03/20 08:43:34
Done.
| |
15 public: | |
16 enum AppListMenuCommands { | |
17 CURRENT_USER, | |
tapted
2013/03/20 07:44:20
It seems common to start these enums from 1 (small
benwells
2013/03/20 08:43:34
Done.
| |
18 SHOW_SETTINGS, | |
19 SHOW_FEEDBACK, | |
20 }; | |
21 | |
22 explicit AppListMenu(AppListViewDelegate* delegate); | |
23 virtual ~AppListMenu() {} | |
tapted
2013/03/20 07:44:20
non-trivial destructor to .cc?
benwells
2013/03/20 08:43:34
Done.
| |
24 | |
25 protected: | |
tapted
2013/03/20 07:44:20
private from here?
(I think non-private data memb
benwells
2013/03/20 08:43:34
Done.
| |
26 ui::SimpleMenuModel menu_model_; | |
27 AppListViewDelegate* delegate_; | |
28 | |
29 private: | |
30 void InitMenu(); | |
31 | |
32 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | |
33 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | |
34 virtual bool GetAcceleratorForCommandId( | |
35 int command_id, | |
36 ui::Accelerator* accelerator) OVERRIDE; | |
37 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(AppListMenu); | |
40 }; | |
41 | |
42 } // namespace app_list | |
43 | |
44 #endif // UI_APP_LIST_APP_LIST_MENU_H_ | |
OLD | NEW |