| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 | 135 |
| 136 // Increments histogram value for visible context menu item specified by |id|. | 136 // Increments histogram value for visible context menu item specified by |id|. |
| 137 virtual void RecordShownItem(int id) = 0; | 137 virtual void RecordShownItem(int id) = 0; |
| 138 | 138 |
| 139 #if BUILDFLAG(ENABLE_PLUGINS) | 139 #if BUILDFLAG(ENABLE_PLUGINS) |
| 140 virtual void HandleAuthorizeAllPlugins() = 0; | 140 virtual void HandleAuthorizeAllPlugins() = 0; |
| 141 #endif | 141 #endif |
| 142 | 142 |
| 143 // Subclasses should send notification. | 143 // Subclasses should send notification. |
| 144 virtual void NotifyMenuShown() = 0; | 144 virtual void NotifyMenuShown() = 0; |
| 145 virtual void NotifyURLOpened(const GURL& url, | |
| 146 content::WebContents* new_contents) = 0; | |
| 147 | 145 |
| 148 // TODO(oshima): Remove this. | 146 // TODO(oshima): Remove this. |
| 149 virtual void AppendPlatformEditableItems() {} | 147 virtual void AppendPlatformEditableItems() {} |
| 150 | 148 |
| 151 // May return nullptr if the frame was deleted while the menu was open. | 149 // May return nullptr if the frame was deleted while the menu was open. |
| 152 content::RenderFrameHost* GetRenderFrameHost(); | 150 content::RenderFrameHost* GetRenderFrameHost(); |
| 153 | 151 |
| 154 bool IsCustomItemChecked(int id) const; | 152 bool IsCustomItemChecked(int id) const; |
| 155 bool IsCustomItemEnabled(int id) const; | 153 bool IsCustomItemEnabled(int id) const; |
| 156 | 154 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 193 bool AppendCustomItems(); | 191 bool AppendCustomItems(); |
| 194 | 192 |
| 195 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; | 193 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; |
| 196 | 194 |
| 197 std::vector<std::unique_ptr<ui::SimpleMenuModel>> custom_submenus_; | 195 std::vector<std::unique_ptr<ui::SimpleMenuModel>> custom_submenus_; |
| 198 | 196 |
| 199 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 197 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
| 200 }; | 198 }; |
| 201 | 199 |
| 202 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 200 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
| OLD | NEW |