OLD | NEW |
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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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|. | 151 // Returns the accelerator for given |command_id|. |
152 bool GetAcceleratorForCommandId(int command_id, | 152 bool GetAcceleratorForCommandId(int command_id, ui::Accelerator* accelerator) |
153 ui::Accelerator* accelerator) override = 0; | 153 const override = 0; |
154 | 154 |
155 // Subclasses should send notification. | 155 // Subclasses should send notification. |
156 virtual void NotifyMenuShown() = 0; | 156 virtual void NotifyMenuShown() = 0; |
157 virtual void NotifyURLOpened(const GURL& url, | 157 virtual void NotifyURLOpened(const GURL& url, |
158 content::WebContents* new_contents) = 0; | 158 content::WebContents* new_contents) = 0; |
159 | 159 |
160 // TODO(oshima): Remove this. | 160 // TODO(oshima): Remove this. |
161 virtual void AppendPlatformEditableItems() {} | 161 virtual void AppendPlatformEditableItems() {} |
162 | 162 |
163 // May return nullptr if the frame was deleted while the menu was open. | 163 // May return nullptr if the frame was deleted while the menu was open. |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 const int render_process_id_; | 203 const int render_process_id_; |
204 | 204 |
205 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; | 205 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; |
206 | 206 |
207 ScopedVector<ui::SimpleMenuModel> custom_submenus_; | 207 ScopedVector<ui::SimpleMenuModel> custom_submenus_; |
208 | 208 |
209 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 209 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
210 }; | 210 }; |
211 | 211 |
212 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 212 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
OLD | NEW |