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

Side by Side Diff: components/renderer_context_menu/render_view_context_menu_base.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 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 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ 5 #ifndef COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_
6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ 6 #define COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <map> 10 #include <map>
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // Increments histogram value for used items specified by |id|. 141 // Increments histogram value for used items specified by |id|.
142 virtual void RecordUsedItem(int id) = 0; 142 virtual void RecordUsedItem(int id) = 0;
143 143
144 // Increments histogram value for visible context menu item specified by |id|. 144 // Increments histogram value for visible context menu item specified by |id|.
145 virtual void RecordShownItem(int id) = 0; 145 virtual void RecordShownItem(int id) = 0;
146 146
147 #if defined(ENABLE_PLUGINS) 147 #if defined(ENABLE_PLUGINS)
148 virtual void HandleAuthorizeAllPlugins() = 0; 148 virtual void HandleAuthorizeAllPlugins() = 0;
149 #endif 149 #endif
150 150
151 // Returns the accelerator for given |command_id|.
152 bool GetAcceleratorForCommandId(int command_id, ui::Accelerator* accelerator)
153 const override = 0;
154
155 // Subclasses should send notification. 151 // Subclasses should send notification.
156 virtual void NotifyMenuShown() = 0; 152 virtual void NotifyMenuShown() = 0;
157 virtual void NotifyURLOpened(const GURL& url, 153 virtual void NotifyURLOpened(const GURL& url,
158 content::WebContents* new_contents) = 0; 154 content::WebContents* new_contents) = 0;
159 155
160 // TODO(oshima): Remove this. 156 // TODO(oshima): Remove this.
161 virtual void AppendPlatformEditableItems() {} 157 virtual void AppendPlatformEditableItems() {}
162 158
163 // May return nullptr if the frame was deleted while the menu was open. 159 // May return nullptr if the frame was deleted while the menu was open.
164 content::RenderFrameHost* GetRenderFrameHost(); 160 content::RenderFrameHost* GetRenderFrameHost();
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 const int render_process_id_; 199 const int render_process_id_;
204 200
205 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; 201 std::unique_ptr<ToolkitDelegate> toolkit_delegate_;
206 202
207 ScopedVector<ui::SimpleMenuModel> custom_submenus_; 203 ScopedVector<ui::SimpleMenuModel> custom_submenus_;
208 204
209 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); 205 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase);
210 }; 206 };
211 207
212 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ 208 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/permission_menu_model.cc ('k') | components/translate/core/browser/options_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698