Separate Simple Backend creation from initialization.
[chromium-blink-merge.git] / ash / launcher / launcher_alignment_menu.h
blobf5e551f34cbaaf7bec87b2f49458652e4c09afb6
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.
5 #ifndef ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_
6 #define ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "ui/base/models/simple_menu_model.h"
12 namespace aura {
13 class RootWindow;
16 namespace ash {
18 // Submenu for choosing the alignment of the launcher.
19 class ASH_EXPORT LauncherAlignmentMenu : public ui::SimpleMenuModel,
20 public ui::SimpleMenuModel::Delegate {
21 public:
22 explicit LauncherAlignmentMenu(aura::RootWindow* root);
23 virtual ~LauncherAlignmentMenu();
25 // ui::SimpleMenuModel::Delegate overrides:
26 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE;
27 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE;
28 virtual bool GetAcceleratorForCommandId(
29 int command_id,
30 ui::Accelerator* accelerator) OVERRIDE;
31 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE;
33 private:
34 enum MenuItem {
35 // Offset so as not to interfere with other menus.
36 MENU_ALIGN_LEFT = 500,
37 MENU_ALIGN_RIGHT,
38 MENU_ALIGN_BOTTOM,
41 aura::RootWindow* root_window_;
43 DISALLOW_COPY_AND_ASSIGN(LauncherAlignmentMenu);
46 } // namespace ash
48 #endif // ASH_WM_LAUNCHER_LAUNCHER_ALIGNMENT_MENU_H_