OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef UI_APP_LIST_APP_LIST_MENU_H_ | 5 #ifndef UI_APP_LIST_APP_LIST_MENU_H_ |
6 #define UI_APP_LIST_APP_LIST_MENU_H_ | 6 #define UI_APP_LIST_APP_LIST_MENU_H_ |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "ui/app_list/app_list_view_delegate.h" | 9 #include "ui/app_list/app_list_view_delegate.h" |
10 #include "ui/base/models/simple_menu_model.h" | 10 #include "ui/base/models/simple_menu_model.h" |
(...skipping 17 matching lines...) Expand all Loading... |
28 explicit AppListMenu(AppListViewDelegate* delegate); | 28 explicit AppListMenu(AppListViewDelegate* delegate); |
29 ~AppListMenu() override; | 29 ~AppListMenu() override; |
30 | 30 |
31 ui::SimpleMenuModel* menu_model() { return &menu_model_; } | 31 ui::SimpleMenuModel* menu_model() { return &menu_model_; } |
32 | 32 |
33 private: | 33 private: |
34 void InitMenu(); | 34 void InitMenu(); |
35 | 35 |
36 bool IsCommandIdChecked(int command_id) const override; | 36 bool IsCommandIdChecked(int command_id) const override; |
37 bool IsCommandIdEnabled(int command_id) const override; | 37 bool IsCommandIdEnabled(int command_id) const override; |
38 bool GetAcceleratorForCommandId(int command_id, | |
39 ui::Accelerator* accelerator) const override; | |
40 void ExecuteCommand(int command_id, int event_flags) override; | 38 void ExecuteCommand(int command_id, int event_flags) override; |
41 | 39 |
42 ui::SimpleMenuModel menu_model_; | 40 ui::SimpleMenuModel menu_model_; |
43 AppListViewDelegate* delegate_; | 41 AppListViewDelegate* delegate_; |
44 AppListViewDelegate::Users users_; | 42 AppListViewDelegate::Users users_; |
45 | 43 |
46 DISALLOW_COPY_AND_ASSIGN(AppListMenu); | 44 DISALLOW_COPY_AND_ASSIGN(AppListMenu); |
47 }; | 45 }; |
48 | 46 |
49 } // namespace app_list | 47 } // namespace app_list |
50 | 48 |
51 #endif // UI_APP_LIST_APP_LIST_MENU_H_ | 49 #endif // UI_APP_LIST_APP_LIST_MENU_H_ |
OLD | NEW |