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

Side by Side Diff: ui/views/examples/menu_example.cc

Issue 623293004: replace OVERRIDE and FINAL with override and final in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase on master 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/views/examples/menu_example.h ('k') | ui/views/examples/message_box_example.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 (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 #include "ui/views/examples/menu_example.h" 5 #include "ui/views/examples/menu_example.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "ui/base/models/simple_menu_model.h" 10 #include "ui/base/models/simple_menu_model.h"
(...skipping 10 matching lines...) Expand all
21 namespace examples { 21 namespace examples {
22 22
23 namespace { 23 namespace {
24 24
25 class ExampleMenuModel : public ui::SimpleMenuModel, 25 class ExampleMenuModel : public ui::SimpleMenuModel,
26 public ui::SimpleMenuModel::Delegate { 26 public ui::SimpleMenuModel::Delegate {
27 public: 27 public:
28 ExampleMenuModel(); 28 ExampleMenuModel();
29 29
30 // ui::SimpleMenuModel::Delegate: 30 // ui::SimpleMenuModel::Delegate:
31 virtual bool IsCommandIdChecked(int command_id) const OVERRIDE; 31 virtual bool IsCommandIdChecked(int command_id) const override;
32 virtual bool IsCommandIdEnabled(int command_id) const OVERRIDE; 32 virtual bool IsCommandIdEnabled(int command_id) const override;
33 virtual bool GetAcceleratorForCommandId( 33 virtual bool GetAcceleratorForCommandId(
34 int command_id, 34 int command_id,
35 ui::Accelerator* accelerator) OVERRIDE; 35 ui::Accelerator* accelerator) override;
36 virtual void ExecuteCommand(int command_id, int event_flags) OVERRIDE; 36 virtual void ExecuteCommand(int command_id, int event_flags) override;
37 37
38 private: 38 private:
39 enum GroupID { 39 enum GroupID {
40 GROUP_MAKE_DECISION, 40 GROUP_MAKE_DECISION,
41 }; 41 };
42 42
43 enum CommandID { 43 enum CommandID {
44 COMMAND_DO_SOMETHING, 44 COMMAND_DO_SOMETHING,
45 COMMAND_SELECT_ASCII, 45 COMMAND_SELECT_ASCII,
46 COMMAND_SELECT_UTF8, 46 COMMAND_SELECT_UTF8,
(...skipping 12 matching lines...) Expand all
59 }; 59 };
60 60
61 class ExampleMenuButton : public MenuButton, public MenuButtonListener { 61 class ExampleMenuButton : public MenuButton, public MenuButtonListener {
62 public: 62 public:
63 explicit ExampleMenuButton(const base::string16& test); 63 explicit ExampleMenuButton(const base::string16& test);
64 virtual ~ExampleMenuButton(); 64 virtual ~ExampleMenuButton();
65 65
66 private: 66 private:
67 // MenuButtonListener: 67 // MenuButtonListener:
68 virtual void OnMenuButtonClicked(View* source, 68 virtual void OnMenuButtonClicked(View* source,
69 const gfx::Point& point) OVERRIDE; 69 const gfx::Point& point) override;
70 70
71 ui::SimpleMenuModel* GetMenuModel(); 71 ui::SimpleMenuModel* GetMenuModel();
72 72
73 scoped_ptr<ExampleMenuModel> menu_model_; 73 scoped_ptr<ExampleMenuModel> menu_model_;
74 scoped_ptr<MenuRunner> menu_runner_; 74 scoped_ptr<MenuRunner> menu_runner_;
75 75
76 DISALLOW_COPY_AND_ASSIGN(ExampleMenuButton); 76 DISALLOW_COPY_AND_ASSIGN(ExampleMenuButton);
77 }; 77 };
78 78
79 // ExampleMenuModel --------------------------------------------------------- 79 // ExampleMenuModel ---------------------------------------------------------
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 void MenuExample::CreateExampleView(View* container) { 216 void MenuExample::CreateExampleView(View* container) {
217 // We add a button to open a menu. 217 // We add a button to open a menu.
218 ExampleMenuButton* menu_button = new ExampleMenuButton( 218 ExampleMenuButton* menu_button = new ExampleMenuButton(
219 ASCIIToUTF16("Open a menu")); 219 ASCIIToUTF16("Open a menu"));
220 container->SetLayoutManager(new FillLayout); 220 container->SetLayoutManager(new FillLayout);
221 container->AddChildView(menu_button); 221 container->AddChildView(menu_button);
222 } 222 }
223 223
224 } // namespace examples 224 } // namespace examples
225 } // namespace views 225 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/examples/menu_example.h ('k') | ui/views/examples/message_box_example.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698