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

Unified Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 2503563002: Drag-and-drop: updateDragCursor (Closed)
Patch Set: Addressed comments by nick@. Created 4 years, 1 month 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: content/browser/renderer_host/render_widget_host_impl.cc
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index aa54face8ed21d62c431223d4392dcfffc7d96a4..458a1f4a8b8e9532a5ed4744d8a629732876d0fa 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -100,6 +100,7 @@
using base::Time;
using base::TimeDelta;
using base::TimeTicks;
+using blink::WebDragOperation;
using blink::WebDragOperationsMask;
using blink::WebGestureEvent;
using blink::WebInputEvent;
@@ -545,6 +546,7 @@ bool RenderWidgetHostImpl::OnMessageReceived(const IPC::Message &msg) {
OnForwardCompositorProto)
IPC_MESSAGE_HANDLER(ViewHostMsg_SetNeedsBeginFrames, OnSetNeedsBeginFrames)
IPC_MESSAGE_HANDLER(DragHostMsg_StartDragging, OnStartDragging)
+ IPC_MESSAGE_HANDLER(DragHostMsg_UpdateDragCursor, OnUpdateDragCursor)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -1514,6 +1516,15 @@ void RenderWidgetHostImpl::OnStartDragging(
bitmap_offset_in_dip, event_info);
}
+void RenderWidgetHostImpl::OnUpdateDragCursor(WebDragOperation current_op) {
+ if (delegate_ && delegate_->OnUpdateDragCursor())
+ return;
+
+ RenderViewHostDelegateView* view = delegate_->GetDelegateView();
+ if (view)
+ view->UpdateDragCursor(current_op);
kenrb 2016/11/16 16:22:15 I have a question about this. Could this be racy i
+}
+
void RenderWidgetHostImpl::RendererExited(base::TerminationStatus status,
int exit_code) {
if (!renderer_initialized_)
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698