blob: e3153177848737830bd21efaaaad26f7b834ba6c [file] [log] [blame]
[email protected]f0a95b442013-09-10 17:40:151// Copyright 2013 The Chromium Authors. All rights reserved.
[email protected]55444502012-05-10 15:43:532// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
James Cook643b7182017-03-05 22:02:585#ifndef ASH_COMMON_SHELF_SHELF_ALIGNMENT_MENU_H_
6#define ASH_COMMON_SHELF_SHELF_ALIGNMENT_MENU_H_
[email protected]55444502012-05-10 15:43:537
8#include "ash/ash_export.h"
avidb567a8a2015-12-20 17:07:249#include "base/macros.h"
[email protected]55444502012-05-10 15:43:5310#include "ui/base/models/simple_menu_model.h"
11
12namespace ash {
13
jamescookda53c142016-06-08 23:38:5614class WmShelf;
msw953caf1f2016-03-18 00:33:2915
jamescookda53c142016-06-08 23:38:5616// Submenu for choosing the alignment of the shelf.
[email protected]f0a95b442013-09-10 17:40:1517class ASH_EXPORT ShelfAlignmentMenu : public ui::SimpleMenuModel,
18 public ui::SimpleMenuModel::Delegate {
[email protected]55444502012-05-10 15:43:5319 public:
jamescookda53c142016-06-08 23:38:5620 explicit ShelfAlignmentMenu(WmShelf* wm_shelf);
dcheng419957cf2014-10-30 22:51:4021 ~ShelfAlignmentMenu() override;
[email protected]55444502012-05-10 15:43:5322
23 // ui::SimpleMenuModel::Delegate overrides:
dcheng419957cf2014-10-30 22:51:4024 bool IsCommandIdChecked(int command_id) const override;
25 bool IsCommandIdEnabled(int command_id) const override;
dcheng419957cf2014-10-30 22:51:4026 void ExecuteCommand(int command_id, int event_flags) override;
[email protected]55444502012-05-10 15:43:5327
28 private:
29 enum MenuItem {
30 // Offset so as not to interfere with other menus.
31 MENU_ALIGN_LEFT = 500,
32 MENU_ALIGN_RIGHT,
33 MENU_ALIGN_BOTTOM,
34 };
35
jamescookda53c142016-06-08 23:38:5636 WmShelf* wm_shelf_;
[email protected]431552c2012-10-23 00:38:3337
[email protected]f0a95b442013-09-10 17:40:1538 DISALLOW_COPY_AND_ASSIGN(ShelfAlignmentMenu);
[email protected]55444502012-05-10 15:43:5339};
40
41} // namespace ash
42
James Cook643b7182017-03-05 22:02:5843#endif // ASH_COMMON_SHELF_SHELF_ALIGNMENT_MENU_H_