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

Unified Diff: chrome/browser/tab_contents/web_drag_source.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
Index: chrome/browser/tab_contents/web_drag_source.cc
===================================================================
--- chrome/browser/tab_contents/web_drag_source.cc (revision 25321)
+++ chrome/browser/tab_contents/web_drag_source.cc (working copy)
@@ -15,6 +15,9 @@
#include "chrome/common/notification_type.h"
#include "chrome/common/notification_service.h"
+using WebKit::WebDragOperationNone;
+using WebKit::WebDragOperationCopy;
+
namespace {
static void GetCursorPositions(gfx::NativeWindow wnd, gfx::Point* client,
@@ -53,8 +56,9 @@
gfx::Point client;
gfx::Point screen;
GetCursorPositions(source_wnd_, &client, &screen);
- render_view_host_->DragSourceCancelledAt(client.x(), client.y(),
- screen.x(), screen.y());
+ render_view_host_->DragSourceEndedAt(client.x(), client.y(),
+ screen.x(), screen.y(),
+ WebDragOperationNone);
}
void WebDragSource::OnDragSourceDrop() {
@@ -65,7 +69,9 @@
gfx::Point screen;
GetCursorPositions(source_wnd_, &client, &screen);
render_view_host_->DragSourceEndedAt(client.x(), client.y(),
- screen.x(), screen.y());
+ screen.x(), screen.y(),
+ WebDragOperationCopy);
+ // TODO(jpa): This needs to be fixed to send the actual drag operation.
}
void WebDragSource::OnDragSourceMove() {
« no previous file with comments | « chrome/browser/tab_contents/tab_contents_view_mac.mm ('k') | chrome/browser/tab_contents/web_drop_target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698