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

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

Issue 2140963002: Added default implementations of GetAcceleratorForCommandId. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@acceleratorprovider-const
Patch Set: Rebase. Created 4 years, 4 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 17 matching lines...) Expand all
28 bool OpenWithMenuObserver::SubMenuDelegate::IsCommandIdChecked( 28 bool OpenWithMenuObserver::SubMenuDelegate::IsCommandIdChecked(
29 int command_id) const { 29 int command_id) const {
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(
39 int command_id,
40 ui::Accelerator* accelerator) const {
41 return false;
42 }
43
44 void OpenWithMenuObserver::SubMenuDelegate::ExecuteCommand(int command_id, 38 void OpenWithMenuObserver::SubMenuDelegate::ExecuteCommand(int command_id,
45 int event_flags) { 39 int event_flags) {
46 parent_->ExecuteCommand(command_id); 40 parent_->ExecuteCommand(command_id);
47 } 41 }
48 42
49 OpenWithMenuObserver::OpenWithMenuObserver(RenderViewContextMenuProxy* proxy) 43 OpenWithMenuObserver::OpenWithMenuObserver(RenderViewContextMenuProxy* proxy)
50 : proxy_(proxy), 44 : proxy_(proxy),
51 submenu_delegate_(this), 45 submenu_delegate_(this),
52 more_apps_label_( 46 more_apps_label_(
53 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_MORE_APPS)) {} 47 l10n_util::GetStringUTF16(IDS_CONTENT_CONTEXT_MORE_APPS)) {}
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 } 183 }
190 } 184 }
191 185
192 return std::make_pair(std::move(handler_map), submenu_parent_command_id); 186 return std::make_pair(std::move(handler_map), submenu_parent_command_id);
193 } 187 }
194 188
195 RenderViewContextMenuObserver* OpenWithMenuFactory::CreateMenu( 189 RenderViewContextMenuObserver* OpenWithMenuFactory::CreateMenu(
196 RenderViewContextMenuProxy* proxy) { 190 RenderViewContextMenuProxy* proxy) {
197 return new OpenWithMenuObserver(proxy); 191 return new OpenWithMenuObserver(proxy);
198 } 192 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698