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

Side by Side Diff: ui/app_list/views/app_list_menu_views.cc

Issue 14696007: Warn on missing OVERRIDE/virtual everywhere, not just in header files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: new regressions, attempt 3 Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « tools/clang/scripts/plugin_flags.sh ('k') | ui/gfx/image/image.cc » ('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 #include "ui/app_list/views/app_list_menu_views.h" 5 #include "ui/app_list/views/app_list_menu_views.h"
6 6
7 #include "grit/ui_resources.h" 7 #include "grit/ui_resources.h"
8 #include "ui/app_list/app_list_view_delegate.h" 8 #include "ui/app_list/app_list_view_delegate.h"
9 #include "ui/base/resource/resource_bundle.h" 9 #include "ui/base/resource/resource_bundle.h"
10 #include "ui/views/controls/button/menu_button.h" 10 #include "ui/views/controls/button/menu_button.h"
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 class AppListMenuModelAdapter : public views::MenuModelAdapter { 88 class AppListMenuModelAdapter : public views::MenuModelAdapter {
89 public: 89 public:
90 AppListMenuModelAdapter(ui::MenuModel* menu_model, 90 AppListMenuModelAdapter(ui::MenuModel* menu_model,
91 AppListViewDelegate* delegate) 91 AppListViewDelegate* delegate)
92 : views::MenuModelAdapter(menu_model), 92 : views::MenuModelAdapter(menu_model),
93 delegate_(delegate) {} 93 delegate_(delegate) {}
94 virtual ~AppListMenuModelAdapter() {} 94 virtual ~AppListMenuModelAdapter() {}
95 95
96 // Overridden from views::MenuModelAdapter: 96 // Overridden from views::MenuModelAdapter:
97 MenuItemView* AppendMenuItem(MenuItemView* menu, 97 virtual MenuItemView* AppendMenuItem(MenuItemView* menu,
98 ui::MenuModel* model, 98 ui::MenuModel* model,
99 int index) OVERRIDE { 99 int index) OVERRIDE {
100 if (!delegate_) 100 if (!delegate_)
101 return NULL; 101 return NULL;
102 102
103 int id = model->GetCommandIdAt(index); 103 int id = model->GetCommandIdAt(index);
104 if (id != AppListMenu::CURRENT_USER) 104 if (id != AppListMenu::CURRENT_USER)
105 return MenuModelAdapter::AppendMenuItem(menu, model, index); 105 return MenuModelAdapter::AppendMenuItem(menu, model, index);
106 106
107 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 107 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
108 MenuItemView* item = new CurrentUserMenuItem( 108 MenuItemView* item = new CurrentUserMenuItem(
109 menu, 109 menu,
(...skipping 29 matching lines...) Expand all
139 ignore_result(menu_runner_->RunMenuAt(button->GetWidget(), button, 139 ignore_result(menu_runner_->RunMenuAt(button->GetWidget(), button,
140 gfx::Rect(point, gfx::Size()), 140 gfx::Rect(point, gfx::Size()),
141 MenuItemView::TOPRIGHT, 0)); 141 MenuItemView::TOPRIGHT, 0));
142 } 142 }
143 143
144 void AppListMenuViews::Cancel() { 144 void AppListMenuViews::Cancel() {
145 menu_runner_->Cancel(); 145 menu_runner_->Cancel();
146 } 146 }
147 147
148 } // namespace app_list 148 } // namespace app_list
OLDNEW
« no previous file with comments | « tools/clang/scripts/plugin_flags.sh ('k') | ui/gfx/image/image.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698