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 CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 | 45 |
46 // Note this could return nullptr if corresponding app item is gone. | 46 // Note this could return nullptr if corresponding app item is gone. |
47 virtual ui::MenuModel* GetMenuModel(); | 47 virtual ui::MenuModel* GetMenuModel(); |
48 | 48 |
49 // ui::SimpleMenuModel::Delegate overrides: | 49 // ui::SimpleMenuModel::Delegate overrides: |
50 bool IsItemForCommandIdDynamic(int command_id) const override; | 50 bool IsItemForCommandIdDynamic(int command_id) const override; |
51 base::string16 GetLabelForCommandId(int command_id) const override; | 51 base::string16 GetLabelForCommandId(int command_id) const override; |
52 bool IsCommandIdChecked(int command_id) const override; | 52 bool IsCommandIdChecked(int command_id) const override; |
53 bool IsCommandIdEnabled(int command_id) const override; | 53 bool IsCommandIdEnabled(int command_id) const override; |
54 bool GetAcceleratorForCommandId(int command_id, | 54 bool GetAcceleratorForCommandId(int command_id, |
55 ui::Accelerator* accelerator) override; | 55 ui::Accelerator* accelerator) const override; |
56 void ExecuteCommand(int command_id, int event_flags) override; | 56 void ExecuteCommand(int command_id, int event_flags) override; |
57 | 57 |
58 protected: | 58 protected: |
59 AppContextMenu(AppContextMenuDelegate* delegate, | 59 AppContextMenu(AppContextMenuDelegate* delegate, |
60 Profile* profile, | 60 Profile* profile, |
61 const std::string& app_id, | 61 const std::string& app_id, |
62 AppListControllerDelegate* controller); | 62 AppListControllerDelegate* controller); |
63 | 63 |
64 // Creates default items, derived class may override to add their specific | 64 // Creates default items, derived class may override to add their specific |
65 // items. | 65 // items. |
(...skipping 14 matching lines...) Expand all Loading... |
80 AppListControllerDelegate* controller_; | 80 AppListControllerDelegate* controller_; |
81 | 81 |
82 std::unique_ptr<ui::SimpleMenuModel> menu_model_; | 82 std::unique_ptr<ui::SimpleMenuModel> menu_model_; |
83 | 83 |
84 DISALLOW_COPY_AND_ASSIGN(AppContextMenu); | 84 DISALLOW_COPY_AND_ASSIGN(AppContextMenu); |
85 }; | 85 }; |
86 | 86 |
87 } // namespace app_list | 87 } // namespace app_list |
88 | 88 |
89 #endif // CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ | 89 #endif // CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ |
OLD | NEW |