1 // Copyright 2013 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_SHELF_SHELF_ALIGNMENT_MENU_H_
6 #define ASH_SHELF_SHELF_ALIGNMENT_MENU_H_
8 #include "ash/ash_export.h"
9 #include "base/basictypes.h"
10 #include "ui/base/models/simple_menu_model.h"
18 // Submenu for choosing the alignment of the launcher.
19 class ASH_EXPORT ShelfAlignmentMenu
: public ui::SimpleMenuModel
,
20 public ui::SimpleMenuModel::Delegate
{
22 explicit ShelfAlignmentMenu(aura::Window
* root
);
23 ~ShelfAlignmentMenu() override
;
25 // ui::SimpleMenuModel::Delegate overrides:
26 bool IsCommandIdChecked(int command_id
) const override
;
27 bool IsCommandIdEnabled(int command_id
) const override
;
28 bool GetAcceleratorForCommandId(int command_id
,
29 ui::Accelerator
* accelerator
) override
;
30 void ExecuteCommand(int command_id
, int event_flags
) override
;
34 // Offset so as not to interfere with other menus.
35 MENU_ALIGN_LEFT
= 500,
40 aura::Window
* root_window_
;
42 DISALLOW_COPY_AND_ASSIGN(ShelfAlignmentMenu
);
47 #endif // ASH_SHELF_SHELF_ALIGNMENT_MENU_H_