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 ASH_WM_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 5 #ifndef ASH_WM_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
6 #define ASH_WM_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 6 #define ASH_WM_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "ash/launcher/launcher_alignment_menu.h" |
10 #include "ash/wm/shelf_auto_hide_behavior.h" | 11 #include "ash/wm/shelf_auto_hide_behavior.h" |
11 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
12 #include "ui/base/models/simple_menu_model.h" | 13 #include "ui/base/models/simple_menu_model.h" |
13 | 14 |
14 namespace ash { | 15 namespace ash { |
15 | 16 |
16 // Context menu for the launcher. | 17 // Context menu for the launcher. |
17 class ASH_EXPORT LauncherContextMenu : public ui::SimpleMenuModel, | 18 class ASH_EXPORT LauncherContextMenu : public ui::SimpleMenuModel, |
18 public ui::SimpleMenuModel::Delegate { | 19 public ui::SimpleMenuModel::Delegate { |
19 public: | 20 public: |
(...skipping 13 matching lines...) Expand all Loading... |
33 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; | 34 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
34 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; | 35 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
35 virtual bool GetAcceleratorForCommandId( | 36 virtual bool GetAcceleratorForCommandId( |
36 int command_id, | 37 int command_id, |
37 ui::Accelerator* accelerator) OVERRIDE; | 38 ui::Accelerator* accelerator) OVERRIDE; |
38 virtual void ExecuteCommand(int command_id) OVERRIDE; | 39 virtual void ExecuteCommand(int command_id) OVERRIDE; |
39 | 40 |
40 private: | 41 private: |
41 enum MenuItem { | 42 enum MenuItem { |
42 MENU_AUTO_HIDE, | 43 MENU_AUTO_HIDE, |
| 44 MENU_ALIGNMENT_MENU, |
43 }; | 45 }; |
44 | 46 |
| 47 LauncherAlignmentMenu alignment_menu_; |
| 48 |
45 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); | 49 DISALLOW_COPY_AND_ASSIGN(LauncherContextMenu); |
46 }; | 50 }; |
47 | 51 |
48 } // namespace ash | 52 } // namespace ash |
49 | 53 |
50 #endif // ASH_WM_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ | 54 #endif // ASH_WM_LAUNCHER_LAUNCHER_CONTEXT_MENU_H_ |
OLD | NEW |