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> |
11 #include <memory> | 11 #include <memory> |
12 #include <string> | 12 #include <string> |
13 #include <utility> | 13 #include <utility> |
14 | 14 |
15 #include "base/macros.h" | 15 #include "base/macros.h" |
16 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
17 #include "base/observer_list.h" | 17 #include "base/observer_list.h" |
18 #include "base/strings/string16.h" | 18 #include "base/strings/string16.h" |
19 #include "components/renderer_context_menu/context_menu_content_type.h" | 19 #include "components/renderer_context_menu/context_menu_content_type.h" |
20 #include "components/renderer_context_menu/render_view_context_menu_observer.h" | 20 #include "components/renderer_context_menu/render_view_context_menu_observer.h" |
21 #include "components/renderer_context_menu/render_view_context_menu_proxy.h" | 21 #include "components/renderer_context_menu/render_view_context_menu_proxy.h" |
22 #include "content/public/common/context_menu_params.h" | 22 #include "content/public/common/context_menu_params.h" |
| 23 #include "ppapi/features/features.h" |
23 #include "ui/base/models/simple_menu_model.h" | 24 #include "ui/base/models/simple_menu_model.h" |
24 #include "ui/base/page_transition_types.h" | 25 #include "ui/base/page_transition_types.h" |
25 #include "ui/base/window_open_disposition.h" | 26 #include "ui/base/window_open_disposition.h" |
26 | 27 |
27 namespace content { | 28 namespace content { |
28 class RenderFrameHost; | 29 class RenderFrameHost; |
29 class WebContents; | 30 class WebContents; |
30 } | 31 } |
31 | 32 |
32 namespace gfx { | 33 namespace gfx { |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 138 |
138 // Menu Construction. | 139 // Menu Construction. |
139 virtual void InitMenu(); | 140 virtual void InitMenu(); |
140 | 141 |
141 // Increments histogram value for used items specified by |id|. | 142 // Increments histogram value for used items specified by |id|. |
142 virtual void RecordUsedItem(int id) = 0; | 143 virtual void RecordUsedItem(int id) = 0; |
143 | 144 |
144 // Increments histogram value for visible context menu item specified by |id|. | 145 // Increments histogram value for visible context menu item specified by |id|. |
145 virtual void RecordShownItem(int id) = 0; | 146 virtual void RecordShownItem(int id) = 0; |
146 | 147 |
147 #if defined(ENABLE_PLUGINS) | 148 #if BUILDFLAG(ENABLE_PLUGINS) |
148 virtual void HandleAuthorizeAllPlugins() = 0; | 149 virtual void HandleAuthorizeAllPlugins() = 0; |
149 #endif | 150 #endif |
150 | 151 |
151 // Subclasses should send notification. | 152 // Subclasses should send notification. |
152 virtual void NotifyMenuShown() = 0; | 153 virtual void NotifyMenuShown() = 0; |
153 virtual void NotifyURLOpened(const GURL& url, | 154 virtual void NotifyURLOpened(const GURL& url, |
154 content::WebContents* new_contents) = 0; | 155 content::WebContents* new_contents) = 0; |
155 | 156 |
156 // TODO(oshima): Remove this. | 157 // TODO(oshima): Remove this. |
157 virtual void AppendPlatformEditableItems() {} | 158 virtual void AppendPlatformEditableItems() {} |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 bool AppendCustomItems(); | 202 bool AppendCustomItems(); |
202 | 203 |
203 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; | 204 std::unique_ptr<ToolkitDelegate> toolkit_delegate_; |
204 | 205 |
205 ScopedVector<ui::SimpleMenuModel> custom_submenus_; | 206 ScopedVector<ui::SimpleMenuModel> custom_submenus_; |
206 | 207 |
207 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); | 208 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenuBase); |
208 }; | 209 }; |
209 | 210 |
210 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ | 211 #endif // COMPONENTS_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_BASE_H_ |
OLD | NEW |