| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
| 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
| 7 | 7 |
| 8 #include "ash/common/shelf/shelf_alignment_menu.h" | 8 #include "ash/common/shelf/shelf_alignment_menu.h" |
| 9 #include "ash/common/shelf/shelf_item_types.h" | 9 #include "ash/common/shelf/shelf_item_types.h" |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 // Static function to create contextmenu instance. | 28 // Static function to create contextmenu instance. |
| 29 static LauncherContextMenu* Create(ChromeLauncherControllerImpl* controller, | 29 static LauncherContextMenu* Create(ChromeLauncherControllerImpl* controller, |
| 30 const ash::ShelfItem* item, | 30 const ash::ShelfItem* item, |
| 31 ash::WmShelf* wm_shelf); | 31 ash::WmShelf* wm_shelf); |
| 32 | 32 |
| 33 // ui::SimpleMenuModel::Delegate overrides: | 33 // ui::SimpleMenuModel::Delegate overrides: |
| 34 bool IsItemForCommandIdDynamic(int command_id) const override; | 34 bool IsItemForCommandIdDynamic(int command_id) const override; |
| 35 base::string16 GetLabelForCommandId(int command_id) const override; | 35 base::string16 GetLabelForCommandId(int command_id) const override; |
| 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 protected: | 40 protected: |
| 43 enum MenuItem { | 41 enum MenuItem { |
| 44 MENU_OPEN_NEW, | 42 MENU_OPEN_NEW, |
| 45 MENU_CLOSE, | 43 MENU_CLOSE, |
| 46 MENU_PIN, | 44 MENU_PIN, |
| 47 LAUNCH_TYPE_PINNED_TAB, | 45 LAUNCH_TYPE_PINNED_TAB, |
| 48 LAUNCH_TYPE_REGULAR_TAB, | 46 LAUNCH_TYPE_REGULAR_TAB, |
| 49 LAUNCH_TYPE_FULLSCREEN, | 47 LAUNCH_TYPE_FULLSCREEN, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 95 ash::ShelfItem item_; | 93 ash::ShelfItem item_; |
| 96 | 94 |
| 97 ash::ShelfAlignmentMenu shelf_alignment_menu_; | 95 ash::ShelfAlignmentMenu shelf_alignment_menu_; |
| 98 | 96 |
| 99 ash::WmShelf* wm_shelf_; | 97 ash::WmShelf* wm_shelf_; |
| 100 | 98 |
| 101 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); | 99 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); |
| 102 }; | 100 }; |
| 103 | 101 |
| 104 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 102 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
| OLD | NEW |