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

Side by Side Diff: ash/shell/context_menu.h

Issue 679283002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 (c) 2012 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_SHELL_CONTEXT_MENU_H_
6 #define ASH_SHELL_CONTEXT_MENU_H_ 6 #define ASH_SHELL_CONTEXT_MENU_H_
7 7
8 #include "ash/shelf/shelf_alignment_menu.h" 8 #include "ash/shelf/shelf_alignment_menu.h"
9 #include "ash/shelf/shelf_types.h" 9 #include "ash/shelf/shelf_types.h"
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "ui/base/models/simple_menu_model.h" 11 #include "ui/base/models/simple_menu_model.h"
12 12
13 namespace aura { 13 namespace aura {
14 class RootWindow; 14 class RootWindow;
15 } 15 }
16 16
17 namespace ash { 17 namespace ash {
18 namespace shell { 18 namespace shell {
19 19
20 // Context menu for the ash_shell. 20 // Context menu for the ash_shell.
21 class ContextMenu : public ui::SimpleMenuModel, 21 class ContextMenu : public ui::SimpleMenuModel,
22 public ui::SimpleMenuModel::Delegate { 22 public ui::SimpleMenuModel::Delegate {
23 public: 23 public:
24 explicit ContextMenu(aura::Window* root); 24 explicit ContextMenu(aura::Window* root);
25 virtual ~ContextMenu(); 25 ~ContextMenu() override;
26 26
27 // ui::SimpleMenuModel::Delegate overrides: 27 // ui::SimpleMenuModel::Delegate overrides:
28 virtual bool IsCommandIdChecked(int command_id) const override; 28 bool IsCommandIdChecked(int command_id) const override;
29 virtual bool IsCommandIdEnabled(int command_id) const override; 29 bool IsCommandIdEnabled(int command_id) const override;
30 virtual bool GetAcceleratorForCommandId( 30 bool GetAcceleratorForCommandId(int command_id,
31 int command_id, 31 ui::Accelerator* accelerator) override;
32 ui::Accelerator* accelerator) override; 32 void ExecuteCommand(int command_id, int event_flags) override;
33 virtual void ExecuteCommand(int command_id, int event_flags) override;
34 33
35 private: 34 private:
36 enum MenuItem { 35 enum MenuItem {
37 MENU_AUTO_HIDE, 36 MENU_AUTO_HIDE,
38 MENU_ALIGNMENT_MENU, 37 MENU_ALIGNMENT_MENU,
39 }; 38 };
40 39
41 aura::Window* root_window_; 40 aura::Window* root_window_;
42 41
43 ShelfAlignmentMenu alignment_menu_; 42 ShelfAlignmentMenu alignment_menu_;
44 43
45 DISALLOW_COPY_AND_ASSIGN(ContextMenu); 44 DISALLOW_COPY_AND_ASSIGN(ContextMenu);
46 }; 45 };
47 46
48 } // namespace shell 47 } // namespace shell
49 } // namespace ash 48 } // namespace ash
50 49
51 #endif // ASH_SHELL_CONTEXT_MENU_H_ 50 #endif // ASH_SHELL_CONTEXT_MENU_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698