OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 "base/string16.h" | 8 #include "base/string16.h" |
9 #include "chrome/common/page_transition_types.h" | 9 #include "chrome/common/page_transition_types.h" |
10 #include "webkit/glue/context_menu.h" | 10 #include "webkit/glue/context_menu.h" |
11 #include "webkit/glue/window_open_disposition.h" | 11 #include "webkit/glue/window_open_disposition.h" |
12 | 12 |
13 class Profile; | 13 class Profile; |
14 class TabContents; | 14 class TabContents; |
15 | 15 |
16 namespace gfx { | 16 namespace gfx { |
17 class Point; | 17 class Point; |
18 } | 18 } |
19 | 19 |
20 namespace WebKit { | 20 namespace WebKit { |
21 struct WebMediaPlayerAction; | 21 struct WebMediaPlayerAction; |
22 } | 22 } |
23 | 23 |
24 class RenderViewContextMenu { | 24 class RenderViewContextMenu { |
25 public: | 25 public: |
26 RenderViewContextMenu( | 26 RenderViewContextMenu(TabContents* tab_contents, |
27 TabContents* tab_contents, | 27 const ContextMenuParams& params); |
28 const ContextMenuParams& params); | |
29 | 28 |
30 virtual ~RenderViewContextMenu(); | 29 virtual ~RenderViewContextMenu(); |
31 | 30 |
32 // Initializes the context menu. | 31 // Initializes the context menu. |
33 void Init(); | 32 void Init(); |
34 | 33 |
35 protected: | 34 protected: |
36 void InitMenu(); | 35 void InitMenu(); |
37 | 36 |
38 // Functions to be implemented by platform-specific subclasses --------------- | 37 // Functions to be implemented by platform-specific subclasses --------------- |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 void Inspect(int x, int y); | 101 void Inspect(int x, int y); |
103 | 102 |
104 // Writes the specified text/url to the system clipboard | 103 // Writes the specified text/url to the system clipboard |
105 void WriteURLToClipboard(const GURL& url); | 104 void WriteURLToClipboard(const GURL& url); |
106 | 105 |
107 void MediaPlayerActionAt(const gfx::Point& location, | 106 void MediaPlayerActionAt(const gfx::Point& location, |
108 const WebKit::WebMediaPlayerAction& action); | 107 const WebKit::WebMediaPlayerAction& action); |
109 | 108 |
110 bool IsDevCommandEnabled(int id) const; | 109 bool IsDevCommandEnabled(int id) const; |
111 | 110 |
| 111 // The destination URL to use if the user tries to search for or navigate to |
| 112 // a text selection. |
| 113 GURL selection_navigation_url_; |
| 114 |
| 115 // The transition type of |selection_navigation_url_|. |
| 116 PageTransition::Type transition_; |
| 117 |
112 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 118 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
113 }; | 119 }; |
114 | 120 |
115 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 121 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |