OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_ |
| 6 #define ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_ |
| 7 #pragma once |
| 8 |
| 9 #include "ash/ash_export.h" |
| 10 #include "base/basictypes.h" |
| 11 #include "ui/base/models/simple_menu_model.h" |
| 12 |
| 13 namespace ash { |
| 14 |
| 15 // Submenu for choosing the alignment of the launcher. |
| 16 class ASH_EXPORT LauncherAlignmentMenu : public ui::SimpleMenuModel, |
| 17 public ui::SimpleMenuModel::Delegate { |
| 18 public: |
| 19 LauncherAlignmentMenu(); |
| 20 virtual ~LauncherAlignmentMenu(); |
| 21 |
| 22 // ui::SimpleMenuModel::Delegate overrides: |
| 23 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; |
| 24 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; |
| 25 virtual bool GetAcceleratorForCommandId( |
| 26 int command_id, |
| 27 ui::Accelerator* accelerator) OVERRIDE; |
| 28 virtual void ExecuteCommand(int command_id) OVERRIDE; |
| 29 |
| 30 private: |
| 31 enum MenuItem { |
| 32 // Offset so as not to interfere with other menus. |
| 33 MENU_ALIGN_LEFT = 500, |
| 34 MENU_ALIGN_RIGHT, |
| 35 MENU_ALIGN_BOTTOM, |
| 36 }; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(LauncherAlignmentMenu); |
| 39 }; |
| 40 |
| 41 } // namespace ash |
| 42 |
| 43 #endif // ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_ |
OLD | NEW |