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/shelf/shelf_alignment_menu.h" | 8 #include "ash/shelf/shelf_alignment_menu.h" |
9 #include "ash/shelf/shelf_item_types.h" | 9 #include "ash/shelf/shelf_item_types.h" |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 LauncherContextMenu(ChromeLauncherController* controller, | 46 LauncherContextMenu(ChromeLauncherController* controller, |
47 aura::Window* root_window); | 47 aura::Window* root_window); |
48 virtual ~LauncherContextMenu(); | 48 virtual ~LauncherContextMenu(); |
49 | 49 |
50 void Init(); | 50 void Init(); |
51 | 51 |
52 // ID of the item we're showing the context menu for. | 52 // ID of the item we're showing the context menu for. |
53 ash::ShelfID id() const { return item_.id; } | 53 ash::ShelfID id() const { return item_.id; } |
54 | 54 |
55 // ui::SimpleMenuModel::Delegate overrides: | 55 // ui::SimpleMenuModel::Delegate overrides: |
56 virtual bool IsItemForCommandIdDynamic(int command_id) const OVERRIDE; | 56 virtual bool IsItemForCommandIdDynamic(int command_id) const override; |
57 virtual base::string16 GetLabelForCommandId(int command_id) const OVERRIDE; | 57 virtual base::string16 GetLabelForCommandId(int command_id) const override; |
58 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 58 virtual bool IsCommandIdChecked(int command_id) const override; |
59 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 59 virtual bool IsCommandIdEnabled(int command_id) const override; |
60 virtual bool IsCommandIdVisible(int command_id) const OVERRIDE; | 60 virtual bool IsCommandIdVisible(int command_id) const override; |
61 virtual bool GetAcceleratorForCommandId( | 61 virtual bool GetAcceleratorForCommandId( |
62 int command_id, | 62 int command_id, |
63 ui::Accelerator* accelerator) OVERRIDE; | 63 ui::Accelerator* accelerator) override; |
64 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; | 64 virtual void ExecuteCommand(int command_id, int event_flags) override; |
65 | 65 |
66 private: | 66 private: |
67 FRIEND_TEST_ALL_PREFIXES( | 67 FRIEND_TEST_ALL_PREFIXES( |
68 LauncherContextMenuTest, | 68 LauncherContextMenuTest, |
69 NewIncognitoWindowMenuIsDisabledWhenIncognitoModeOff); | 69 NewIncognitoWindowMenuIsDisabledWhenIncognitoModeOff); |
70 FRIEND_TEST_ALL_PREFIXES( | 70 FRIEND_TEST_ALL_PREFIXES( |
71 LauncherContextMenuTest, | 71 LauncherContextMenuTest, |
72 NewWindowMenuIsDisabledWhenIncognitoModeForced); | 72 NewWindowMenuIsDisabledWhenIncognitoModeForced); |
73 FRIEND_TEST_ALL_PREFIXES( | 73 FRIEND_TEST_ALL_PREFIXES( |
74 LauncherContextMenuTest, | 74 LauncherContextMenuTest, |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 | 106 |
107 aura::Window* root_window_; | 107 aura::Window* root_window_; |
108 | 108 |
109 // Not owned. | 109 // Not owned. |
110 ash::ShelfItemDelegate* item_delegate_; | 110 ash::ShelfItemDelegate* item_delegate_; |
111 | 111 |
112 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); | 112 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); |
113 }; | 113 }; |
114 | 114 |
115 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 115 #endif // CHROME_BROWSER_UI_ASH_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
OLD | NEW |