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(TabContents* tab_contents, | 26 RenderViewContextMenu( |
27 const ContextMenuParams& params); | 27 TabContents* tab_contents, |
| 28 const ContextMenuParams& params); |
28 | 29 |
29 virtual ~RenderViewContextMenu(); | 30 virtual ~RenderViewContextMenu(); |
30 | 31 |
31 // Initializes the context menu. | 32 // Initializes the context menu. |
32 void Init(); | 33 void Init(); |
33 | 34 |
34 protected: | 35 protected: |
35 void InitMenu(); | 36 void InitMenu(); |
36 | 37 |
37 // Functions to be implemented by platform-specific subclasses --------------- | 38 // Functions to be implemented by platform-specific subclasses --------------- |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 void Inspect(int x, int y); | 102 void Inspect(int x, int y); |
102 | 103 |
103 // Writes the specified text/url to the system clipboard | 104 // Writes the specified text/url to the system clipboard |
104 void WriteURLToClipboard(const GURL& url); | 105 void WriteURLToClipboard(const GURL& url); |
105 | 106 |
106 void MediaPlayerActionAt(const gfx::Point& location, | 107 void MediaPlayerActionAt(const gfx::Point& location, |
107 const WebKit::WebMediaPlayerAction& action); | 108 const WebKit::WebMediaPlayerAction& action); |
108 | 109 |
109 bool IsDevCommandEnabled(int id) const; | 110 bool IsDevCommandEnabled(int id) const; |
110 | 111 |
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 | |
118 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); | 112 DISALLOW_COPY_AND_ASSIGN(RenderViewContextMenu); |
119 }; | 113 }; |
120 | 114 |
121 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ | 115 #endif // CHROME_BROWSER_TAB_CONTENTS_RENDER_VIEW_CONTEXT_MENU_H_ |
OLD | NEW |