| 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 ~AppContextMenu() override; | 44 ~AppContextMenu() override; |
| 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, | |
| 55 ui::Accelerator* accelerator) const override; | |
| 56 void ExecuteCommand(int command_id, int event_flags) override; | 54 void ExecuteCommand(int command_id, int event_flags) override; |
| 57 | 55 |
| 58 protected: | 56 protected: |
| 59 AppContextMenu(AppContextMenuDelegate* delegate, | 57 AppContextMenu(AppContextMenuDelegate* delegate, |
| 60 Profile* profile, | 58 Profile* profile, |
| 61 const std::string& app_id, | 59 const std::string& app_id, |
| 62 AppListControllerDelegate* controller); | 60 AppListControllerDelegate* controller); |
| 63 | 61 |
| 64 // Creates default items, derived class may override to add their specific | 62 // Creates default items, derived class may override to add their specific |
| 65 // items. | 63 // items. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 80 AppListControllerDelegate* controller_; | 78 AppListControllerDelegate* controller_; |
| 81 | 79 |
| 82 std::unique_ptr<ui::SimpleMenuModel> menu_model_; | 80 std::unique_ptr<ui::SimpleMenuModel> menu_model_; |
| 83 | 81 |
| 84 DISALLOW_COPY_AND_ASSIGN(AppContextMenu); | 82 DISALLOW_COPY_AND_ASSIGN(AppContextMenu); |
| 85 }; | 83 }; |
| 86 | 84 |
| 87 } // namespace app_list | 85 } // namespace app_list |
| 88 | 86 |
| 89 #endif // CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ | 87 #endif // CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ |
| OLD | NEW |