OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 6 #define CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 namespace extensions { | 35 namespace extensions { |
36 class Extension; | 36 class Extension; |
37 class MenuItem; | 37 class MenuItem; |
38 } | 38 } |
39 | 39 |
40 namespace gfx { | 40 namespace gfx { |
41 class Point; | 41 class Point; |
42 } | 42 } |
43 | 43 |
44 namespace WebKit { | 44 namespace blink { |
45 struct WebMediaPlayerAction; | 45 struct WebMediaPlayerAction; |
46 struct WebPluginAction; | 46 struct WebPluginAction; |
47 } | 47 } |
48 | 48 |
49 // An interface that controls a RenderViewContextMenu instance from observers. | 49 // An interface that controls a RenderViewContextMenu instance from observers. |
50 // This interface is designed mainly for controlling the instance while showing | 50 // This interface is designed mainly for controlling the instance while showing |
51 // so we can add a context-menu item that takes long time to create its text, | 51 // so we can add a context-menu item that takes long time to create its text, |
52 // such as retrieving the item text from a server. The simplest usage is: | 52 // such as retrieving the item text from a server. The simplest usage is: |
53 // 1. Adding an item with temporary text; | 53 // 1. Adding an item with temporary text; |
54 // 2. Posting a background task that creates the item text, and; | 54 // 2. Posting a background task that creates the item text, and; |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 // Get an image located at a point in the RenderView for search. | 240 // Get an image located at a point in the RenderView for search. |
241 void GetImageThumbnailForSearch(); | 241 void GetImageThumbnailForSearch(); |
242 | 242 |
243 // Launch the inspector targeting a point in the RenderView | 243 // Launch the inspector targeting a point in the RenderView |
244 void Inspect(int x, int y); | 244 void Inspect(int x, int y); |
245 | 245 |
246 // Writes the specified text/url to the system clipboard | 246 // Writes the specified text/url to the system clipboard |
247 void WriteURLToClipboard(const GURL& url); | 247 void WriteURLToClipboard(const GURL& url); |
248 | 248 |
249 void MediaPlayerActionAt(const gfx::Point& location, | 249 void MediaPlayerActionAt(const gfx::Point& location, |
250 const WebKit::WebMediaPlayerAction& action); | 250 const blink::WebMediaPlayerAction& action); |
251 void PluginActionAt(const gfx::Point& location, | 251 void PluginActionAt(const gfx::Point& location, |
252 const WebKit::WebPluginAction& action); | 252 const blink::WebPluginAction& action); |
253 | 253 |
254 bool IsDevCommandEnabled(int id) const; | 254 bool IsDevCommandEnabled(int id) const; |
255 | 255 |
256 // Returns a list of registered ProtocolHandlers that can handle the clicked | 256 // Returns a list of registered ProtocolHandlers that can handle the clicked |
257 // on URL. | 257 // on URL. |
258 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl(); | 258 ProtocolHandlerRegistry::ProtocolHandlerList GetHandlersForLinkUrl(); |
259 | 259 |
260 // Returns a (possibly truncated) version of the current selection text | 260 // Returns a (possibly truncated) version of the current selection text |
261 // suitable or putting in the title of a menu item. | 261 // suitable or putting in the title of a menu item. |
262 string16 PrintableSelectionText(); | 262 string16 PrintableSelectionText(); |
(...skipping 29 matching lines...) Expand all Loading... |
292 // Guests are rendered inside chrome apps, but have most of the actions | 292 // Guests are rendered inside chrome apps, but have most of the actions |
293 // that a regular web page has. | 293 // that a regular web page has. |
294 // Currently actions/items that are suppressed from guests are: searching, | 294 // Currently actions/items that are suppressed from guests are: searching, |
295 // printing, speech and instant. | 295 // printing, speech and instant. |
296 bool is_guest_; | 296 bool is_guest_; |
297 | 297 |
298 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 298 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
299 }; | 299 }; |
300 | 300 |
301 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 301 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |