| 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 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "ui/base/models/simple_menu_model.h" | 12 #include "ui/base/models/simple_menu_model.h" |
| 13 | 13 |
| 14 class AppListControllerDelegate; | 14 class AppListControllerDelegate; |
| 15 class Profile; | 15 class Profile; |
| 16 | 16 |
| 17 namespace app_list { | 17 namespace app_list { |
| 18 | 18 |
| 19 class AppContextMenuDelegate; | 19 class AppContextMenuDelegate; |
| 20 | 20 |
| 21 // Base class of all context menus in app list view. | 21 // Base class of all context menus in app list view. |
| 22 class AppContextMenu : public ui::SimpleMenuModel::Delegate { | 22 class AppContextMenu : public ui::SimpleMenuModel::Delegate { |
| 23 public: | 23 public: |
| 24 // Defines command ids, used in context menu of all types. | 24 // Defines command ids, used in context menu of all types. |
| 25 enum CommandId { | 25 enum CommandId { |
| 26 LAUNCH_NEW = 100, | 26 LAUNCH_NEW = 100, |
| 27 TOGGLE_PIN, | 27 TOGGLE_PIN, |
| 28 CREATE_SHORTCUTS, | |
| 29 SHOW_APP_INFO, | 28 SHOW_APP_INFO, |
| 30 OPTIONS, | 29 OPTIONS, |
| 31 UNINSTALL, | 30 UNINSTALL, |
| 32 REMOVE_FROM_FOLDER, | 31 REMOVE_FROM_FOLDER, |
| 33 MENU_NEW_WINDOW, | 32 MENU_NEW_WINDOW, |
| 34 MENU_NEW_INCOGNITO_WINDOW, | 33 MENU_NEW_INCOGNITO_WINDOW, |
| 35 // Order matters in USE_LAUNCH_TYPE_* and must match the LaunchType enum. | 34 // Order matters in USE_LAUNCH_TYPE_* and must match the LaunchType enum. |
| 36 USE_LAUNCH_TYPE_COMMAND_START = 200, | 35 USE_LAUNCH_TYPE_COMMAND_START = 200, |
| 37 USE_LAUNCH_TYPE_PINNED = USE_LAUNCH_TYPE_COMMAND_START, | 36 USE_LAUNCH_TYPE_PINNED = USE_LAUNCH_TYPE_COMMAND_START, |
| 38 USE_LAUNCH_TYPE_REGULAR, | 37 USE_LAUNCH_TYPE_REGULAR, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 AppListControllerDelegate* controller_; | 77 AppListControllerDelegate* controller_; |
| 79 | 78 |
| 80 std::unique_ptr<ui::SimpleMenuModel> menu_model_; | 79 std::unique_ptr<ui::SimpleMenuModel> menu_model_; |
| 81 | 80 |
| 82 DISALLOW_COPY_AND_ASSIGN(AppContextMenu); | 81 DISALLOW_COPY_AND_ASSIGN(AppContextMenu); |
| 83 }; | 82 }; |
| 84 | 83 |
| 85 } // namespace app_list | 84 } // namespace app_list |
| 86 | 85 |
| 87 #endif // CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ | 86 #endif // CHROME_BROWSER_UI_APP_LIST_APP_CONTEXT_MENU_H_ |
| OLD | NEW |