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

Side by Side Diff: chrome/browser/renderer_context_menu/mock_render_view_context_menu.cc

Issue 2133013002: AcceleratorProvider: Make GetAcceleratorForCommandId const. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix overrides on Mac and Chrome OS. Created 4 years, 5 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 2016 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 #include "chrome/browser/renderer_context_menu/mock_render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/mock_render_view_context_menu.h"
6 6
7 #include "chrome/app/chrome_command_ids.h" 7 #include "chrome/app/chrome_command_ids.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/grit/generated_resources.h" 9 #include "chrome/grit/generated_resources.h"
10 #include "chrome/test/base/testing_profile.h" 10 #include "chrome/test/base/testing_profile.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 int event_flags) { 46 int event_flags) {
47 observer_->ExecuteCommand(command_id); 47 observer_->ExecuteCommand(command_id);
48 } 48 }
49 49
50 void MockRenderViewContextMenu::MenuWillShow(ui::SimpleMenuModel* source) {} 50 void MockRenderViewContextMenu::MenuWillShow(ui::SimpleMenuModel* source) {}
51 51
52 void MockRenderViewContextMenu::MenuClosed(ui::SimpleMenuModel* source) {} 52 void MockRenderViewContextMenu::MenuClosed(ui::SimpleMenuModel* source) {}
53 53
54 bool MockRenderViewContextMenu::GetAcceleratorForCommandId( 54 bool MockRenderViewContextMenu::GetAcceleratorForCommandId(
55 int command_id, 55 int command_id,
56 ui::Accelerator* accelerator) { 56 ui::Accelerator* accelerator) const {
57 return false; 57 return false;
58 } 58 }
59 59
60 void MockRenderViewContextMenu::AddMenuItem(int command_id, 60 void MockRenderViewContextMenu::AddMenuItem(int command_id,
61 const base::string16& title) { 61 const base::string16& title) {
62 MockMenuItem item; 62 MockMenuItem item;
63 item.command_id = command_id; 63 item.command_id = command_id;
64 item.enabled = observer_->IsCommandIdEnabled(command_id); 64 item.enabled = observer_->IsCommandIdEnabled(command_id);
65 item.checked = false; 65 item.checked = false;
66 item.hidden = false; 66 item.hidden = false;
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 MockMenuItem* item) const { 178 MockMenuItem* item) const {
179 if (index >= items_.size()) 179 if (index >= items_.size())
180 return false; 180 return false;
181 *item = items_[index]; 181 *item = items_[index];
182 return true; 182 return true;
183 } 183 }
184 184
185 PrefService* MockRenderViewContextMenu::GetPrefs() { 185 PrefService* MockRenderViewContextMenu::GetPrefs() {
186 return profile_->GetPrefs(); 186 return profile_->GetPrefs();
187 } 187 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698