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

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

Issue 2501213002: Drag-and-drop: dragSourceEndedAt, dragSourceSystemDragEnded (Closed)
Patch Set: Rebased. Added check for !GetWebWidget(). 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_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 22b693502e08a66f095275bd42a813a5dbe5f364..b3b4e822ba2b0739870141f28e0dc31c20681428 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2959,14 +2959,19 @@ void WebContentsImpl::Close() {
Close(GetRenderViewHost());
}
-void WebContentsImpl::DragSourceEndedAt(int client_x, int client_y,
- int screen_x, int screen_y, blink::WebDragOperation operation) {
+void WebContentsImpl::DragSourceEndedAt(int client_x,
+ int client_y,
+ int screen_x,
+ int screen_y,
+ blink::WebDragOperation operation) {
if (browser_plugin_embedder_.get())
- browser_plugin_embedder_->DragSourceEndedAt(client_x, client_y,
- screen_x, screen_y, operation);
+ browser_plugin_embedder_->DragSourceEndedAt(
+ client_x, client_y, screen_x, screen_y, operation);
+ // TODO(paulmeyer): This will need to target the correct specific RWH to work
+ // with OOPIF.
if (GetRenderViewHost())
- GetRenderViewHost()->DragSourceEndedAt(client_x, client_y, screen_x,
- screen_y, operation);
+ GetRenderViewHost()->GetWidget()->DragSourceEndedAt(
+ client_x, client_y, screen_x, screen_y, operation);
}
void WebContentsImpl::LoadStateChanged(
@@ -3018,8 +3023,10 @@ void WebContentsImpl::NotifyWebContentsFocused() {
}
void WebContentsImpl::SystemDragEnded() {
+ // TODO(paulmeyer): This will need to target the correct specific RWH to work
+ // with OOPIF.
if (GetRenderViewHost())
- GetRenderViewHost()->DragSourceSystemDragEnded();
+ GetRenderViewHost()->GetWidget()->DragSourceSystemDragEnded();
if (browser_plugin_embedder_.get())
browser_plugin_embedder_->SystemDragEnded();
}

Powered by Google App Engine
This is Rietveld 408576698