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

Unified Diff: content/browser/web_contents/web_contents_view_aura.cc

Issue 2509933002: Drag-and-drop: Target drag messages (the sequel). (Closed)
Patch Set: Addressed additional comments by avi@, dcheng@. 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/web_contents/web_contents_view_aura.cc
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 33eb38197875c695da52cb90e2df86b976af3a48..fb3f694d48cac690556eb74911fc58e84fcec1bd 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -562,18 +562,11 @@ void WebContentsViewAura::EndDrag(blink::WebDragOperationsMask ops) {
if (screen_position_client)
screen_position_client->ConvertPointFromScreen(window, &client_loc);
- if (!drag_start_rwh_)
- return;
-
- if (drag_start_rwh_.get() ==
- web_contents_->GetRenderViewHost()->GetWidget()) {
- web_contents_->DragSourceEndedAt(client_loc.x(), client_loc.x(),
- screen_loc.x(), screen_loc.y(), ops);
- }
-
- // TODO(paulmeyer): In the OOPIF case, should |client_loc| be converted to the
- // coordinates local to |drag_start_rwh_|? See crbug.com/647249.
- drag_start_rwh_->DragSourceEndedAt(client_loc, screen_loc, ops);
+ // TODO(paulmeyer): In the OOPIF case, should |client_loc| be converted to
+ // the coordinates local to |drag_start_rwh_|? See crbug.com/647249.
+ web_contents_->DragSourceEndedAt(client_loc.x(), client_loc.x(),
+ screen_loc.x(), screen_loc.y(), ops,
+ drag_start_rwh_.get());
}
void WebContentsViewAura::InstallOverscrollControllerDelegate(
@@ -894,7 +887,7 @@ void WebContentsViewAura::StartDragging(
RenderWidgetHostImpl* source_rwh) {
aura::Window* root_window = GetNativeView()->GetRootWindow();
if (!aura::client::GetDragDropClient(root_window)) {
- web_contents_->SystemDragEnded();
+ web_contents_->SystemDragEnded(source_rwh);
return;
}
@@ -943,7 +936,7 @@ void WebContentsViewAura::StartDragging(
}
EndDrag(ConvertToWeb(result_op));
- web_contents_->SystemDragEnded();
+ web_contents_->SystemDragEnded(source_rwh);
}
void WebContentsViewAura::UpdateDragCursor(blink::WebDragOperation operation) {
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/browser/web_contents/web_contents_view_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698