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

Side by Side Diff: chrome/browser/renderer_context_menu/open_with_menu_factory_ash.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/open_with_menu_factory_ash.h" 5 #include "chrome/browser/renderer_context_menu/open_with_menu_factory_ash.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 19 matching lines...) Expand all
30 return false; 30 return false;
31 } 31 }
32 32
33 bool OpenWithMenuObserver::SubMenuDelegate::IsCommandIdEnabled( 33 bool OpenWithMenuObserver::SubMenuDelegate::IsCommandIdEnabled(
34 int command_id) const { 34 int command_id) const {
35 return true; 35 return true;
36 } 36 }
37 37
38 bool OpenWithMenuObserver::SubMenuDelegate::GetAcceleratorForCommandId( 38 bool OpenWithMenuObserver::SubMenuDelegate::GetAcceleratorForCommandId(
39 int command_id, 39 int command_id,
40 ui::Accelerator* accelerator) { 40 ui::Accelerator* accelerator) const {
41 return false; 41 return false;
42 } 42 }
43 43
44 void OpenWithMenuObserver::SubMenuDelegate::ExecuteCommand(int command_id, 44 void OpenWithMenuObserver::SubMenuDelegate::ExecuteCommand(int command_id,
45 int event_flags) { 45 int event_flags) {
46 parent_->ExecuteCommand(command_id); 46 parent_->ExecuteCommand(command_id);
47 } 47 }
48 48
49 OpenWithMenuObserver::OpenWithMenuObserver(RenderViewContextMenuProxy* proxy) 49 OpenWithMenuObserver::OpenWithMenuObserver(RenderViewContextMenuProxy* proxy)
50 : proxy_(proxy), 50 : proxy_(proxy),
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 189 }
190 } 190 }
191 191
192 return std::make_pair(std::move(handler_map), submenu_parent_command_id); 192 return std::make_pair(std::move(handler_map), submenu_parent_command_id);
193 } 193 }
194 194
195 RenderViewContextMenuObserver* OpenWithMenuFactory::CreateMenu( 195 RenderViewContextMenuObserver* OpenWithMenuFactory::CreateMenu(
196 RenderViewContextMenuProxy* proxy) { 196 RenderViewContextMenuProxy* proxy) {
197 return new OpenWithMenuObserver(proxy); 197 return new OpenWithMenuObserver(proxy);
198 } 198 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698