OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 WEBKIT_GLUE_WEBVIEW_H_ | 5 #ifndef WEBKIT_GLUE_WEBVIEW_H_ |
6 #define WEBKIT_GLUE_WEBVIEW_H_ | 6 #define WEBKIT_GLUE_WEBVIEW_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "webkit/api/public/WebDragOperation.h" |
12 #include "webkit/api/public/WebWidget.h" | 13 #include "webkit/api/public/WebWidget.h" |
13 | 14 |
14 namespace WebKit { | 15 namespace WebKit { |
15 class WebDragData; | 16 class WebDragData; |
16 class WebFrame; | 17 class WebFrame; |
17 class WebSettings; | 18 class WebSettings; |
18 struct WebPoint; | 19 struct WebPoint; |
19 } | 20 } |
20 | 21 |
21 class GURL; | 22 class GURL; |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 // WebView (if there is such an image) | 181 // WebView (if there is such an image) |
181 virtual void CopyImageAt(int x, int y) = 0; | 182 virtual void CopyImageAt(int x, int y) = 0; |
182 | 183 |
183 // Inspect a particular point in the WebView. (x = -1 || y = -1) is a special | 184 // Inspect a particular point in the WebView. (x = -1 || y = -1) is a special |
184 // case which means inspect the current page and not a specific point. | 185 // case which means inspect the current page and not a specific point. |
185 virtual void InspectElement(int x, int y) = 0; | 186 virtual void InspectElement(int x, int y) = 0; |
186 | 187 |
187 // Show the JavaScript console. | 188 // Show the JavaScript console. |
188 virtual void ShowJavaScriptConsole() = 0; | 189 virtual void ShowJavaScriptConsole() = 0; |
189 | 190 |
190 // Notifies the webview that a drag has been cancelled. | 191 // Notifies the webview that a drag has ended (with a drop or a cancel). |
191 virtual void DragSourceCancelledAt( | |
192 const WebKit::WebPoint& client_point, | |
193 const WebKit::WebPoint& screen_point) = 0; | |
194 | |
195 // Notifies the webview that a drag has terminated. | |
196 virtual void DragSourceEndedAt( | 192 virtual void DragSourceEndedAt( |
197 const WebKit::WebPoint& client_point, | 193 const WebKit::WebPoint& client_point, |
198 const WebKit::WebPoint& screen_point) = 0; | 194 const WebKit::WebPoint& screen_point, |
| 195 WebKit::WebDragOperation operation) = 0; |
199 | 196 |
200 // Notifies the webview that a drag and drop operation is in progress, with | 197 // Notifies the webview that a drag and drop operation is in progress, with |
201 // dropable items over the view. | 198 // dropable items over the view. |
202 virtual void DragSourceMovedTo( | 199 virtual void DragSourceMovedTo( |
203 const WebKit::WebPoint& client_point, | 200 const WebKit::WebPoint& client_point, |
204 const WebKit::WebPoint& screen_point) = 0; | 201 const WebKit::WebPoint& screen_point) = 0; |
205 | 202 |
206 // Notfies the webview that the system drag and drop operation has ended. | 203 // Notfies the webview that the system drag and drop operation has ended. |
207 virtual void DragSourceSystemDragEnded() = 0; | 204 virtual void DragSourceSystemDragEnded() = 0; |
208 | 205 |
209 // Callback methods when a drag and drop operation is trying to drop data | 206 // Callback methods when a drag and drop operation is trying to drop data |
210 // on this webview. | 207 // on this webview. |
211 virtual bool DragTargetDragEnter( | 208 virtual WebKit::WebDragOperation DragTargetDragEnter( |
212 const WebKit::WebDragData& drag_data, int identity, | 209 const WebKit::WebDragData& drag_data, int identity, |
213 const WebKit::WebPoint& client_point, | 210 const WebKit::WebPoint& client_point, |
214 const WebKit::WebPoint& screen_point) = 0; | 211 const WebKit::WebPoint& screen_point, |
215 virtual bool DragTargetDragOver( | 212 WebKit::WebDragOperationsMask operations_allowed) = 0; |
| 213 virtual WebKit::WebDragOperation DragTargetDragOver( |
216 const WebKit::WebPoint& client_point, | 214 const WebKit::WebPoint& client_point, |
217 const WebKit::WebPoint& screen_point) = 0; | 215 const WebKit::WebPoint& screen_point, |
| 216 WebKit::WebDragOperationsMask operations_allowed) = 0; |
218 virtual void DragTargetDragLeave() = 0; | 217 virtual void DragTargetDragLeave() = 0; |
219 virtual void DragTargetDrop( | 218 virtual void DragTargetDrop( |
220 const WebKit::WebPoint& client_point, | 219 const WebKit::WebPoint& client_point, |
221 const WebKit::WebPoint& screen_point) = 0; | 220 const WebKit::WebPoint& screen_point) = 0; |
222 | 221 |
223 // Helper method for drag and drop target operations: return the drag data | 222 // Helper method for drag and drop target operations: return the drag data |
224 // identity. | 223 // identity. |
225 virtual int32 GetDragIdentity() = 0; | 224 virtual int32 GetDragIdentity() = 0; |
226 | 225 |
227 // Helper method for drag and drop target operations: override the default | 226 // Helper method for drag and drop target operations: override the default |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 | 259 |
261 #if defined(OS_LINUX) | 260 #if defined(OS_LINUX) |
262 virtual void SetThemeFocusRingColor(int r, int g, int b) = 0; | 261 virtual void SetThemeFocusRingColor(int r, int g, int b) = 0; |
263 #endif | 262 #endif |
264 | 263 |
265 private: | 264 private: |
266 DISALLOW_COPY_AND_ASSIGN(WebView); | 265 DISALLOW_COPY_AND_ASSIGN(WebView); |
267 }; | 266 }; |
268 | 267 |
269 #endif // WEBKIT_GLUE_WEBVIEW_H_ | 268 #endif // WEBKIT_GLUE_WEBVIEW_H_ |
OLD | NEW |