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

Unified Diff: chrome/renderer/render_view.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 | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebDragOperation.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/render_view.cc
===================================================================
--- chrome/renderer/render_view.cc (revision 25321)
+++ chrome/renderer/render_view.cc (working copy)
@@ -108,6 +108,8 @@
using WebKit::WebData;
using WebKit::WebDataSource;
using WebKit::WebDragData;
+using WebKit::WebDragOperation;
+using WebKit::WebDragOperationsMask;
using WebKit::WebForm;
using WebKit::WebFrame;
using WebKit::WebHistoryItem;
@@ -2144,8 +2146,12 @@
}
void RenderView::StartDragging(WebView* webview,
- const WebDragData& drag_data) {
- Send(new ViewHostMsg_StartDragging(routing_id_, WebDropData(drag_data)));
+ const WebKit::WebPoint &mouseCoords,
+ const WebDragData& drag_data,
+ WebDragOperationsMask allowed_ops) {
+ Send(new ViewHostMsg_StartDragging(routing_id_,
+ WebDropData(drag_data),
+ allowed_ops));
}
void RenderView::TakeFocus(WebView* webview, bool reverse) {
@@ -2652,12 +2658,10 @@
void RenderView::OnDragSourceEndedOrMoved(const gfx::Point& client_point,
const gfx::Point& screen_point,
- bool ended, bool cancelled) {
+ bool ended,
+ WebDragOperation op) {
if (ended) {
- if (cancelled)
- webview()->DragSourceCancelledAt(client_point, screen_point);
- else
- webview()->DragSourceEndedAt(client_point, screen_point);
+ webview()->DragSourceEndedAt(client_point, screen_point, op);
} else {
webview()->DragSourceMovedTo(client_point, screen_point);
}
@@ -2714,22 +2718,27 @@
void RenderView::OnDragTargetDragEnter(const WebDropData& drop_data,
const gfx::Point& client_point,
- const gfx::Point& screen_point) {
- bool is_drop_target = webview()->DragTargetDragEnter(
+ const gfx::Point& screen_point,
+ WebDragOperationsMask ops) {
+ WebDragOperation operation = webview()->DragTargetDragEnter(
drop_data.ToDragData(),
drop_data.identity,
client_point,
- screen_point);
+ screen_point,
+ ops);
- Send(new ViewHostMsg_UpdateDragCursor(routing_id_, is_drop_target));
+ Send(new ViewHostMsg_UpdateDragCursor(routing_id_, operation));
}
void RenderView::OnDragTargetDragOver(const gfx::Point& client_point,
- const gfx::Point& screen_point) {
- bool is_drop_target =
- webview()->DragTargetDragOver(client_point, screen_point);
+ const gfx::Point& screen_point,
+ WebDragOperationsMask ops) {
+ WebDragOperation operation = webview()->DragTargetDragOver(
+ client_point,
+ screen_point,
+ ops);
- Send(new ViewHostMsg_UpdateDragCursor(routing_id_, is_drop_target));
+ Send(new ViewHostMsg_UpdateDragCursor(routing_id_, operation));
}
void RenderView::OnDragTargetDragLeave() {
« no previous file with comments | « chrome/renderer/render_view.h ('k') | webkit/api/public/WebDragOperation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698