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

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu_test_util.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h" 9 #include "chrome/browser/renderer_context_menu/render_view_context_menu_test_uti l.h"
10 #include "content/public/browser/web_contents.h" 10 #include "content/public/browser/web_contents.h"
(...skipping 19 matching lines...) Expand all
30 params.link_url = link_url; 30 params.link_url = link_url;
31 params.frame_url = frame_url; 31 params.frame_url = frame_url;
32 TestRenderViewContextMenu* menu = 32 TestRenderViewContextMenu* menu =
33 new TestRenderViewContextMenu(web_contents->GetMainFrame(), params); 33 new TestRenderViewContextMenu(web_contents->GetMainFrame(), params);
34 menu->Init(); 34 menu->Init();
35 return menu; 35 return menu;
36 } 36 }
37 37
38 bool TestRenderViewContextMenu::GetAcceleratorForCommandId( 38 bool TestRenderViewContextMenu::GetAcceleratorForCommandId(
39 int command_id, 39 int command_id,
40 ui::Accelerator* accelerator) { 40 ui::Accelerator* accelerator) const {
41 // None of our commands have accelerators, so always return false. 41 // None of our commands have accelerators, so always return false.
42 return false; 42 return false;
43 } 43 }
44 44
45 bool TestRenderViewContextMenu::IsItemPresent(int command_id) { 45 bool TestRenderViewContextMenu::IsItemPresent(int command_id) {
46 return menu_model_.GetIndexOfCommandId(command_id) != -1; 46 return menu_model_.GetIndexOfCommandId(command_id) != -1;
47 } 47 }
48 48
49 bool TestRenderViewContextMenu::IsItemInRangePresent(int command_id_first, 49 bool TestRenderViewContextMenu::IsItemInRangePresent(int command_id_first,
50 int command_id_last) { 50 int command_id_last) {
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const base::FilePath& path) { 85 const base::FilePath& path) {
86 size_t count = profile_link_paths_.size(); 86 size_t count = profile_link_paths_.size();
87 for (size_t i = 0; i < count; ++i) 87 for (size_t i = 0; i < count; ++i)
88 if (profile_link_paths_[i] == path) 88 if (profile_link_paths_[i] == path)
89 return IDC_OPEN_LINK_IN_PROFILE_FIRST + static_cast<int>(i); 89 return IDC_OPEN_LINK_IN_PROFILE_FIRST + static_cast<int>(i);
90 return -1; 90 return -1;
91 } 91 }
92 92
93 void TestRenderViewContextMenu::Show() { 93 void TestRenderViewContextMenu::Show() {
94 } 94 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698