Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: ash/mus/context_menu_mus.h

Issue 1760743002: Add simple mash context menu support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove chrome delegation; address other comments. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_SHELL_CONTEXT_MENU_H_ 5 #ifndef ASH_MUS_CONTEXT_MENU_MUS_H_
6 #define ASH_SHELL_CONTEXT_MENU_H_ 6 #define ASH_MUS_CONTEXT_MENU_MUS_H_
7 7
8 #include "ash/shelf/shelf_alignment_menu.h" 8 #include "ash/shelf/shelf_alignment_menu.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
11 11
12 namespace ash { 12 namespace ash {
13 13
14 class Shelf; 14 class Shelf;
15 15
16 namespace shell { 16 // Context menu for mash.
17 17 // TODO(msw): Mimic logic in LauncherContextMenu.
18 // Context menu for the ash shell. 18 class ContextMenuMus : public ui::SimpleMenuModel,
19 class ContextMenu : public ui::SimpleMenuModel, 19 public ui::SimpleMenuModel::Delegate {
20 public ui::SimpleMenuModel::Delegate {
21 public: 20 public:
22 explicit ContextMenu(Shelf* shelf); 21 explicit ContextMenuMus(Shelf* shelf);
23 ~ContextMenu() override; 22 ~ContextMenuMus() override;
24 23
25 // ui::SimpleMenuModel::Delegate overrides: 24 // ui::SimpleMenuModel::Delegate overrides:
26 bool IsCommandIdChecked(int command_id) const override; 25 bool IsCommandIdChecked(int command_id) const override;
27 bool IsCommandIdEnabled(int command_id) const override; 26 bool IsCommandIdEnabled(int command_id) const override;
28 bool GetAcceleratorForCommandId(int command_id, 27 bool GetAcceleratorForCommandId(int command_id,
29 ui::Accelerator* accelerator) override; 28 ui::Accelerator* accelerator) override;
30 void ExecuteCommand(int command_id, int event_flags) override; 29 void ExecuteCommand(int command_id, int event_flags) override;
31 30
32 private: 31 private:
33 enum MenuItem { 32 enum MenuItem {
34 MENU_AUTO_HIDE, 33 MENU_AUTO_HIDE,
35 MENU_ALIGNMENT_MENU, 34 MENU_ALIGNMENT_MENU,
35 MENU_CHANGE_WALLPAPER,
36 }; 36 };
37 37
38 Shelf* shelf_; 38 Shelf* shelf_;
39 ShelfAlignmentMenu alignment_menu_; 39 ShelfAlignmentMenu alignment_menu_;
40 40
41 DISALLOW_COPY_AND_ASSIGN(ContextMenu); 41 DISALLOW_COPY_AND_ASSIGN(ContextMenuMus);
42 }; 42 };
43 43
44 } // namespace shell
45 } // namespace ash 44 } // namespace ash
46 45
47 #endif // ASH_SHELL_CONTEXT_MENU_H_ 46 #endif // ASH_MUS_CONTEXT_MENU_MUS_H_
OLDNEW
« no previous file with comments | « ash/mus/DEPS ('k') | ash/mus/context_menu_mus.cc » ('j') | ash/shelf/shelf_view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698