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

Side by Side Diff: ui/app_list/app_list_menu.h

Issue 667923002: Standardize usage of virtual/override/final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « ui/app_list/app_list_item_list_unittest.cc ('k') | ui/app_list/app_list_model.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 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 UI_APP_LIST_APP_LIST_MENU_H_ 5 #ifndef UI_APP_LIST_APP_LIST_MENU_H_
6 #define UI_APP_LIST_APP_LIST_MENU_H_ 6 #define UI_APP_LIST_APP_LIST_MENU_H_
7 7
8 #include "ui/app_list/app_list_view_delegate.h" 8 #include "ui/app_list/app_list_view_delegate.h"
9 #include "ui/base/models/simple_menu_model.h" 9 #include "ui/base/models/simple_menu_model.h"
10 10
11 namespace app_list { 11 namespace app_list {
12 12
13 // Menu for the app list. This is shown in the top right hand corner of the 13 // Menu for the app list. This is shown in the top right hand corner of the
14 // app list. 14 // app list.
15 // TODO(benwells): We should consider moving this into Chrome. 15 // TODO(benwells): We should consider moving this into Chrome.
16 class AppListMenu : public ui::SimpleMenuModel::Delegate { 16 class AppListMenu : public ui::SimpleMenuModel::Delegate {
17 public: 17 public:
18 enum AppListMenuCommands { 18 enum AppListMenuCommands {
19 SHOW_SETTINGS, 19 SHOW_SETTINGS,
20 SHOW_HELP, 20 SHOW_HELP,
21 SHOW_FEEDBACK, 21 SHOW_FEEDBACK,
22 // |SELECT_PROFILE| must remain the last enum because values greater than 22 // |SELECT_PROFILE| must remain the last enum because values greater than
23 // |SELECT_PROFILE| are used to indicate a profile index. 23 // |SELECT_PROFILE| are used to indicate a profile index.
24 SELECT_PROFILE, 24 SELECT_PROFILE,
25 }; 25 };
26 26
27 explicit AppListMenu(AppListViewDelegate* delegate); 27 explicit AppListMenu(AppListViewDelegate* delegate);
28 virtual ~AppListMenu(); 28 ~AppListMenu() override;
29 29
30 ui::SimpleMenuModel* menu_model() { return &menu_model_; } 30 ui::SimpleMenuModel* menu_model() { return &menu_model_; }
31 31
32 private: 32 private:
33 void InitMenu(); 33 void InitMenu();
34 34
35 virtual bool IsCommandIdChecked(int command_id) const override; 35 bool IsCommandIdChecked(int command_id) const override;
36 virtual bool IsCommandIdEnabled(int command_id) const override; 36 bool IsCommandIdEnabled(int command_id) const override;
37 virtual bool GetAcceleratorForCommandId( 37 bool GetAcceleratorForCommandId(int command_id,
38 int command_id, 38 ui::Accelerator* accelerator) override;
39 ui::Accelerator* accelerator) override; 39 void ExecuteCommand(int command_id, int event_flags) override;
40 virtual void ExecuteCommand(int command_id, int event_flags) override;
41 40
42 ui::SimpleMenuModel menu_model_; 41 ui::SimpleMenuModel menu_model_;
43 AppListViewDelegate* delegate_; 42 AppListViewDelegate* delegate_;
44 AppListViewDelegate::Users users_; 43 AppListViewDelegate::Users users_;
45 44
46 DISALLOW_COPY_AND_ASSIGN(AppListMenu); 45 DISALLOW_COPY_AND_ASSIGN(AppListMenu);
47 }; 46 };
48 47
49 } // namespace app_list 48 } // namespace app_list
50 49
51 #endif // UI_APP_LIST_APP_LIST_MENU_H_ 50 #endif // UI_APP_LIST_APP_LIST_MENU_H_
OLDNEW
« no previous file with comments | « ui/app_list/app_list_item_list_unittest.cc ('k') | ui/app_list/app_list_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698