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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 ui::Accelerator* accelerator) override = 0; | 153 ui::Accelerator* accelerator) 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 content::RenderFrameHost* GetRenderFrameHost(); | 164 content::RenderFrameHost* GetRenderFrameHost(); |
164 | 165 |
165 bool IsCustomItemChecked(int id) const; | 166 bool IsCustomItemChecked(int id) const; |
166 bool IsCustomItemEnabled(int id) const; | 167 bool IsCustomItemEnabled(int id) const; |
167 | 168 |
168 // Opens the specified URL string in a new tab. | 169 // Opens the specified URL string in a new tab. |
169 void OpenURL(const GURL& url, const GURL& referrer, | 170 void OpenURL(const GURL& url, const GURL& referrer, |
170 WindowOpenDisposition disposition, | 171 WindowOpenDisposition disposition, |
171 ui::PageTransition transition); | 172 ui::PageTransition transition); |
172 | 173 |
(...skipping 29 matching lines...) Expand all Loading... |
202 const int render_process_id_; | 203 const int render_process_id_; |
203 | 204 |
204 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; | 205 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; |
205 | 206 |
206 ScopedVector<ui::SimpleMenuModel> custom_submenus_; | 207 ScopedVector<ui::SimpleMenuModel> custom_submenus_; |
207 | 208 |
208 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 209 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
209 }; | 210 }; |
210 | 211 |
211 #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 |