Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(993)

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.h

Issue 2512563003: Convert enable_plugins to a buildflag header. (Closed)
Patch Set: Merge Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "extensions/features/features.h" 23 #include "extensions/features/features.h"
24 #include "ppapi/features/features.h"
24 #include "printing/features/features.h" 25 #include "printing/features/features.h"
25 #include "ui/base/models/simple_menu_model.h" 26 #include "ui/base/models/simple_menu_model.h"
26 #include "ui/base/window_open_disposition.h" 27 #include "ui/base/window_open_disposition.h"
27 #include "ui/gfx/geometry/vector2d.h" 28 #include "ui/gfx/geometry/vector2d.h"
28 29
29 #if BUILDFLAG(ENABLE_EXTENSIONS) 30 #if BUILDFLAG(ENABLE_EXTENSIONS)
30 #include "chrome/browser/extensions/context_menu_matcher.h" 31 #include "chrome/browser/extensions/context_menu_matcher.h"
31 #include "chrome/browser/extensions/menu_manager.h" 32 #include "chrome/browser/extensions/menu_manager.h"
32 #endif 33 #endif
33 34
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 const content::ContextMenuParams& params, 111 const content::ContextMenuParams& params,
111 const extensions::MenuItem::ContextList& contexts, 112 const extensions::MenuItem::ContextList& contexts,
112 const extensions::URLPatternSet& target_url_patterns); 113 const extensions::URLPatternSet& target_url_patterns);
113 static bool MenuItemMatchesParams(const content::ContextMenuParams& params, 114 static bool MenuItemMatchesParams(const content::ContextMenuParams& params,
114 const extensions::MenuItem* item); 115 const extensions::MenuItem* item);
115 #endif 116 #endif
116 117
117 // RenderViewContextMenuBase: 118 // RenderViewContextMenuBase:
118 void InitMenu() override; 119 void InitMenu() override;
119 void RecordShownItem(int id) override; 120 void RecordShownItem(int id) override;
120 #if defined(ENABLE_PLUGINS) 121 #if BUILDFLAG(ENABLE_PLUGINS)
121 void HandleAuthorizeAllPlugins() override; 122 void HandleAuthorizeAllPlugins() override;
122 #endif 123 #endif
123 void NotifyMenuShown() override; 124 void NotifyMenuShown() override;
124 void NotifyURLOpened(const GURL& url, 125 void NotifyURLOpened(const GURL& url,
125 content::WebContents* new_contents) override; 126 content::WebContents* new_contents) override;
126 127
127 // Gets the extension (if any) associated with the WebContents that we're in. 128 // Gets the extension (if any) associated with the WebContents that we're in.
128 const extensions::Extension* GetExtension() const; 129 const extensions::Extension* GetExtension() const;
129 130
130 void AppendDeveloperItems(); 131 void AppendDeveloperItems();
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 245
245 // In the case of a MimeHandlerView this will point to the WebContents that 246 // In the case of a MimeHandlerView this will point to the WebContents that
246 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as 247 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as
247 // |source_web_contents_|. 248 // |source_web_contents_|.
248 content::WebContents* const embedder_web_contents_; 249 content::WebContents* const embedder_web_contents_;
249 250
250 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); 251 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
251 }; 252 };
252 253
253 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ 254 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « chrome/browser/profiles/profile_impl.cc ('k') | chrome/browser/renderer_context_menu/render_view_context_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698