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

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

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 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_FACTORY_ASH_H_ 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_FACTORY_ASH_H_
6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_FACTORY_ASH_H_ 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_FACTORY_ASH_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <unordered_map> 9 #include <unordered_map>
10 #include <utility> 10 #include <utility>
(...skipping 18 matching lines...) Expand all
29 public: 29 public:
30 using HandlerMap = std::unordered_map<int, ash::LinkHandlerInfo>; 30 using HandlerMap = std::unordered_map<int, ash::LinkHandlerInfo>;
31 31
32 class SubMenuDelegate : public ui::SimpleMenuModel::Delegate { 32 class SubMenuDelegate : public ui::SimpleMenuModel::Delegate {
33 public: 33 public:
34 explicit SubMenuDelegate(OpenWithMenuObserver* parent) : parent_(parent) {} 34 explicit SubMenuDelegate(OpenWithMenuObserver* parent) : parent_(parent) {}
35 ~SubMenuDelegate() override {} 35 ~SubMenuDelegate() override {}
36 36
37 bool IsCommandIdChecked(int command_id) const override; 37 bool IsCommandIdChecked(int command_id) const override;
38 bool IsCommandIdEnabled(int command_id) const override; 38 bool IsCommandIdEnabled(int command_id) const override;
39 bool GetAcceleratorForCommandId(
40 int command_id,
41 ui::Accelerator* accelerator) const override;
42 void ExecuteCommand(int command_id, int event_flags) override; 39 void ExecuteCommand(int command_id, int event_flags) override;
43 40
44 private: 41 private:
45 OpenWithMenuObserver* const parent_; 42 OpenWithMenuObserver* const parent_;
46 43
47 DISALLOW_COPY_AND_ASSIGN(SubMenuDelegate); 44 DISALLOW_COPY_AND_ASSIGN(SubMenuDelegate);
48 }; 45 };
49 46
50 explicit OpenWithMenuObserver(RenderViewContextMenuProxy* proxy); 47 explicit OpenWithMenuObserver(RenderViewContextMenuProxy* proxy);
51 ~OpenWithMenuObserver() override; 48 ~OpenWithMenuObserver() override;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 // A menu model received from Ash side. 86 // A menu model received from Ash side.
90 std::unique_ptr<ash::LinkHandlerModel> menu_model_; 87 std::unique_ptr<ash::LinkHandlerModel> menu_model_;
91 OpenWithMenuObserver::HandlerMap handlers_; 88 OpenWithMenuObserver::HandlerMap handlers_;
92 // A submenu passed to Chrome side. 89 // A submenu passed to Chrome side.
93 std::unique_ptr<ui::MenuModel> submenu_; 90 std::unique_ptr<ui::MenuModel> submenu_;
94 91
95 DISALLOW_COPY_AND_ASSIGN(OpenWithMenuObserver); 92 DISALLOW_COPY_AND_ASSIGN(OpenWithMenuObserver);
96 }; 93 };
97 94
98 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_FACTORY_ASH_H_ 95 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_OPEN_WITH_MENU_FACTORY_ASH_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698