Chromium Code Reviews| 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..8d985a0abd75633780e5640e97aba290b3e56df0 100644 |
| --- a/content/browser/web_contents/web_contents_view_aura.cc |
| +++ b/content/browser/web_contents/web_contents_view_aura.cc |
| @@ -562,18 +562,13 @@ 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()) { |
| + if (drag_start_rwh_) { |
|
dcheng
2016/11/17 19:59:01
Let's centralize the null checks in WebContents, p
paulmeyer
2016/11/17 20:46:43
Done.
|
| + // 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); |
| + screen_loc.x(), screen_loc.y(), ops, |
| + drag_start_rwh_.get()); |
| } |
| - |
| - // 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); |
| } |
| void WebContentsViewAura::InstallOverscrollControllerDelegate( |
| @@ -894,7 +889,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 +938,7 @@ void WebContentsViewAura::StartDragging( |
| } |
| EndDrag(ConvertToWeb(result_op)); |
| - web_contents_->SystemDragEnded(); |
| + web_contents_->SystemDragEnded(source_rwh); |
| } |
| void WebContentsViewAura::UpdateDragCursor(blink::WebDragOperation operation) { |