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 CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/files/file_path.h" | 13 #include "base/files/file_path.h" |
14 #include "base/observer_list.h" | 14 #include "base/observer_list.h" |
15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
16 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" | 16 #include "chrome/browser/custom_handlers/protocol_handler_registry.h" |
17 #include "chrome/browser/ui/browser.h" | 17 #include "chrome/browser/ui/browser.h" |
18 #include "components/renderer_context_menu/context_menu_content_type.h" | 18 #include "components/renderer_context_menu/context_menu_content_type.h" |
19 #include "components/renderer_context_menu/render_view_context_menu_base.h" | 19 #include "components/renderer_context_menu/render_view_context_menu_base.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 "printing/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/window_open_disposition.h" | 25 #include "ui/base/window_open_disposition.h" |
25 #include "ui/gfx/geometry/vector2d.h" | 26 #include "ui/gfx/geometry/vector2d.h" |
26 | 27 |
27 #if defined(ENABLE_EXTENSIONS) | 28 #if defined(ENABLE_EXTENSIONS) |
28 #include "chrome/browser/extensions/context_menu_matcher.h" | 29 #include "chrome/browser/extensions/context_menu_matcher.h" |
29 #include "chrome/browser/extensions/menu_manager.h" | 30 #include "chrome/browser/extensions/menu_manager.h" |
30 #endif | 31 #endif |
31 | 32 |
32 class OpenWithMenuObserver; | 33 class OpenWithMenuObserver; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 #if !defined(OS_MACOSX) | 229 #if !defined(OS_MACOSX) |
229 // An observer that handles the submenu for showing spelling options. This | 230 // An observer that handles the submenu for showing spelling options. This |
230 // submenu lets users select the spelling language, for example. | 231 // submenu lets users select the spelling language, for example. |
231 std::unique_ptr<SpellingOptionsSubMenuObserver> | 232 std::unique_ptr<SpellingOptionsSubMenuObserver> |
232 spelling_options_submenu_observer_; | 233 spelling_options_submenu_observer_; |
233 #endif | 234 #endif |
234 | 235 |
235 // An observer that handles "Open with <app>" items. | 236 // An observer that handles "Open with <app>" items. |
236 std::unique_ptr<RenderViewContextMenuObserver> open_with_menu_observer_; | 237 std::unique_ptr<RenderViewContextMenuObserver> open_with_menu_observer_; |
237 | 238 |
238 #if defined(ENABLE_PRINT_PREVIEW) | 239 #if BUILDFLAG(ENABLE_PRINT_PREVIEW) |
239 // An observer that disables menu items when print preview is active. | 240 // An observer that disables menu items when print preview is active. |
240 std::unique_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; | 241 std::unique_ptr<PrintPreviewContextMenuObserver> print_preview_menu_observer_; |
241 #endif | 242 #endif |
242 | 243 |
243 // In the case of a MimeHandlerView this will point to the WebContents that | 244 // In the case of a MimeHandlerView this will point to the WebContents that |
244 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as | 245 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as |
245 // |source_web_contents_|. | 246 // |source_web_contents_|. |
246 content::WebContents* const embedder_web_contents_; | 247 content::WebContents* const embedder_web_contents_; |
247 | 248 |
248 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 249 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
249 }; | 250 }; |
250 | 251 |
251 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ | 252 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |