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

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

Issue 2219173002: Re-land "Disable Print in the context menu when a modal dialog is shown" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Create the GetBrowser() helper method Created 4 years, 4 months 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
« no previous file with comments | « no previous file | chrome/browser/renderer_context_menu/render_view_context_menu.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/renderer_context_menu/context_menu_content_type.h" 18 #include "components/renderer_context_menu/context_menu_content_type.h"
18 #include "components/renderer_context_menu/render_view_context_menu_base.h" 19 #include "components/renderer_context_menu/render_view_context_menu_base.h"
19 #include "components/renderer_context_menu/render_view_context_menu_observer.h" 20 #include "components/renderer_context_menu/render_view_context_menu_observer.h"
20 #include "components/renderer_context_menu/render_view_context_menu_proxy.h" 21 #include "components/renderer_context_menu/render_view_context_menu_proxy.h"
21 #include "content/public/common/context_menu_params.h" 22 #include "content/public/common/context_menu_params.h"
22 #include "ui/base/models/simple_menu_model.h" 23 #include "ui/base/models/simple_menu_model.h"
23 #include "ui/base/window_open_disposition.h" 24 #include "ui/base/window_open_disposition.h"
24 #include "ui/gfx/geometry/vector2d.h" 25 #include "ui/gfx/geometry/vector2d.h"
25 26
26 #if defined(ENABLE_EXTENSIONS) 27 #if defined(ENABLE_EXTENSIONS)
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 bool IsReloadEnabled() const; 158 bool IsReloadEnabled() const;
158 bool IsViewSourceEnabled() const; 159 bool IsViewSourceEnabled() const;
159 bool IsDevCommandEnabled(int id) const; 160 bool IsDevCommandEnabled(int id) const;
160 bool IsTranslateEnabled() const; 161 bool IsTranslateEnabled() const;
161 bool IsSaveLinkAsEnabled() const; 162 bool IsSaveLinkAsEnabled() const;
162 bool IsSaveImageAsEnabled() const; 163 bool IsSaveImageAsEnabled() const;
163 bool IsSaveAsEnabled() const; 164 bool IsSaveAsEnabled() const;
164 bool IsSavePageEnabled() const; 165 bool IsSavePageEnabled() const;
165 bool IsPasteEnabled() const; 166 bool IsPasteEnabled() const;
166 bool IsPasteAndMatchStyleEnabled() const; 167 bool IsPasteAndMatchStyleEnabled() const;
168 bool IsPrintPreviewEnabled() const;
167 bool IsRouteMediaEnabled() const; 169 bool IsRouteMediaEnabled() const;
168 170
169 // Command execution functions. 171 // Command execution functions.
170 void ExecOpenLinkNewTab(); 172 void ExecOpenLinkNewTab();
171 void ExecProtocolHandler(int event_flags, int handler_index); 173 void ExecProtocolHandler(int event_flags, int handler_index);
172 void ExecOpenLinkInProfile(int profile_index); 174 void ExecOpenLinkInProfile(int profile_index);
173 void ExecInspectElement(); 175 void ExecInspectElement();
174 void ExecInspectBackgroundPage(); 176 void ExecInspectBackgroundPage();
175 void ExecSaveLinkAs(); 177 void ExecSaveLinkAs();
176 void ExecSaveAs(); 178 void ExecSaveAs();
(...skipping 17 matching lines...) Expand all
194 void ExecProtocolHandlerSettings(int event_flags); 196 void ExecProtocolHandlerSettings(int event_flags);
195 197
196 // Writes the specified text/url to the system clipboard 198 // Writes the specified text/url to the system clipboard
197 void WriteURLToClipboard(const GURL& url); 199 void WriteURLToClipboard(const GURL& url);
198 200
199 void MediaPlayerActionAt(const gfx::Point& location, 201 void MediaPlayerActionAt(const gfx::Point& location,
200 const blink::WebMediaPlayerAction& action); 202 const blink::WebMediaPlayerAction& action);
201 void PluginActionAt(const gfx::Point& location, 203 void PluginActionAt(const gfx::Point& location,
202 const blink::WebPluginAction& action); 204 const blink::WebPluginAction& action);
203 205
206 Browser* GetBrowser() const;
207
204 // Returns a list of registered ProtocolHandlers that can handle the clicked 208 // Returns a list of registered ProtocolHandlers that can handle the clicked
205 // on URL. 209 // on URL.
206 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl(); 210 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl();
207 211
208 // The destination URL to use if the user tries to search for or navigate to 212 // The destination URL to use if the user tries to search for or navigate to
209 // a text selection. 213 // a text selection.
210 GURL selection_navigation_url_; 214 GURL selection_navigation_url_;
211 215
212 ui::SimpleMenuModel profile_link_submenu_model_; 216 ui::SimpleMenuModel profile_link_submenu_model_;
213 std::vector<base::FilePath> profile_link_paths_; 217 std::vector<base::FilePath> profile_link_paths_;
(...skipping 22 matching lines...) Expand all
236 240
237 // In the case of a MimeHandlerView this will point to the WebContents that 241 // In the case of a MimeHandlerView this will point to the WebContents that
238 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as 242 // embeds the MimeHandlerViewGuest. Otherwise this will be the same as
239 // |source_web_contents_|. 243 // |source_web_contents_|.
240 content::WebContents* const embedder_web_contents_; 244 content::WebContents* const embedder_web_contents_;
241 245
242 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); 246 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu);
243 }; 247 };
244 248
245 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_ 249 #endif // CHROME_BROWSER_RENDERER_CONTEXT_MENU_RENDER_VIEW_CONTEXT_MENU_H_
OLDNEW
« no previous file with comments | « no previous file | 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