summaryrefslogtreecommitdiffstats
path: root/webkit/tools/test_shell/drop_delegate.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/tools/test_shell/drop_delegate.cc')
-rw-r--r--webkit/tools/test_shell/drop_delegate.cc21
1 files changed, 15 insertions, 6 deletions
diff --git a/webkit/tools/test_shell/drop_delegate.cc b/webkit/tools/test_shell/drop_delegate.cc
index 77d6679..fed2514 100644
--- a/webkit/tools/test_shell/drop_delegate.cc
+++ b/webkit/tools/test_shell/drop_delegate.cc
@@ -4,10 +4,15 @@
#include "webkit/tools/test_shell/drop_delegate.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webview.h"
+using WebKit::WebPoint;
+
// BaseDropTarget methods ----------------------------------------------------
+
DWORD TestDropDelegate::OnDragEnter(IDataObject* data_object,
DWORD key_state,
POINT cursor_position,
@@ -17,8 +22,10 @@ DWORD TestDropDelegate::OnDragEnter(IDataObject* data_object,
POINT client_pt = cursor_position;
ScreenToClient(GetHWND(), &client_pt);
- bool valid = webview_->DragTargetDragEnter(drop_data, client_pt.x,
- client_pt.y, cursor_position.x, cursor_position.y);
+ bool valid = webview_->DragTargetDragEnter(
+ drop_data.ToDragData(), drop_data.identity,
+ WebPoint(client_pt.x, client_pt.y),
+ WebPoint(cursor_position.x, cursor_position.y));
return valid ? DROPEFFECT_COPY : DROPEFFECT_NONE;
}
@@ -28,8 +35,9 @@ DWORD TestDropDelegate::OnDragOver(IDataObject* data_object,
DWORD effect) {
POINT client_pt = cursor_position;
ScreenToClient(GetHWND(), &client_pt);
- bool valid = webview_->DragTargetDragOver(client_pt.x,
- client_pt.y, cursor_position.x, cursor_position.y);
+ bool valid = webview_->DragTargetDragOver(
+ WebPoint(client_pt.x, client_pt.y),
+ WebPoint(cursor_position.x, cursor_position.y));
return valid ? DROPEFFECT_COPY : DROPEFFECT_NONE;
}
@@ -43,8 +51,9 @@ DWORD TestDropDelegate::OnDrop(IDataObject* data_object,
DWORD effect) {
POINT client_pt = cursor_position;
ScreenToClient(GetHWND(), &client_pt);
- webview_->DragTargetDrop(client_pt.x, client_pt.y,
- cursor_position.x, cursor_position.y);
+ webview_->DragTargetDrop(
+ WebPoint(client_pt.x, client_pt.y),
+ WebPoint(cursor_position.x, cursor_position.y));
// webkit win port always returns DROPEFFECT_NONE
return DROPEFFECT_NONE;