Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(370)

Unified Diff: webkit/tools/test_shell/drop_delegate.cc

Issue 174364: Plumb the DragOperation through all the layers between the platform DnD code ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/tools/test_shell/drag_delegate.cc ('k') | webkit/tools/test_shell/event_sending_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « webkit/tools/test_shell/drag_delegate.cc ('k') | webkit/tools/test_shell/event_sending_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698