| Index: webkit/tools/test_shell/drop_delegate.cc
|
| ===================================================================
|
| --- webkit/tools/test_shell/drop_delegate.cc (revision 25321)
|
| +++ webkit/tools/test_shell/drop_delegate.cc (working copy)
|
| @@ -9,6 +9,8 @@
|
| #include "webkit/glue/webdropdata.h"
|
| #include "webkit/glue/webview.h"
|
|
|
| +using WebKit::WebDragOperation;
|
| +using WebKit::WebDragOperationCopy;
|
| using WebKit::WebPoint;
|
|
|
| // BaseDropTarget methods ----------------------------------------------------
|
| @@ -22,11 +24,14 @@
|
|
|
| POINT client_pt = cursor_position;
|
| ScreenToClient(GetHWND(), &client_pt);
|
| - bool valid = webview_->DragTargetDragEnter(
|
| + WebDragOperation op = 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;
|
| + WebPoint(cursor_position.x, cursor_position.y),
|
| + WebDragOperationCopy);
|
| + // TODO(snej): Pass the real drag operation instead
|
| + return op ? DROPEFFECT_COPY : DROPEFFECT_NONE;
|
| + // TODO(snej): Return the real drop effect constant matching 'op'
|
| }
|
|
|
| DWORD TestDropDelegate::OnDragOver(IDataObject* data_object,
|
| @@ -35,10 +40,13 @@
|
| DWORD effect) {
|
| POINT client_pt = cursor_position;
|
| ScreenToClient(GetHWND(), &client_pt);
|
| - bool valid = webview_->DragTargetDragOver(
|
| + WebDragOperation op = webview_->DragTargetDragOver(
|
| WebPoint(client_pt.x, client_pt.y),
|
| - WebPoint(cursor_position.x, cursor_position.y));
|
| - return valid ? DROPEFFECT_COPY : DROPEFFECT_NONE;
|
| + WebPoint(cursor_position.x, cursor_position.y),
|
| + WebDragOperationCopy);
|
| + // TODO(snej): Pass the real drag operation instead
|
| + return op ? DROPEFFECT_COPY : DROPEFFECT_NONE;
|
| + // TODO(snej): Return the real drop effect constant matching 'op'
|
| }
|
|
|
| void TestDropDelegate::OnDragLeave(IDataObject* data_object) {
|
|
|