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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.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/browser_plugin/browser_plugin_guest.cc
diff --git a/content/browser/browser_plugin/browser_plugin_guest.cc b/content/browser/browser_plugin/browser_plugin_guest.cc
index 1d6931d0a4a3d74c1085e76670112c08327f32f7..14e4e993b987dbb9aa05bef4535f887e3f25312a 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -509,10 +509,15 @@ void BrowserPluginGuest::SendMessageToEmbedder(
owner_web_contents_->Send(msg.release());
}
-void BrowserPluginGuest::DragSourceEndedAt(int client_x, int client_y,
- int screen_x, int screen_y, blink::WebDragOperation operation) {
- web_contents()->GetRenderViewHost()->DragSourceEndedAt(client_x, client_y,
- screen_x, screen_y, operation);
+void BrowserPluginGuest::DragSourceEndedAt(int client_x,
+ int client_y,
+ int screen_x,
+ int screen_y,
+ blink::WebDragOperation operation) {
+ // TODO(paulmeyer): This will need to target the correct specific
+ // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
+ web_contents()->GetRenderViewHost()->GetWidget()->DragSourceEndedAt(
+ client_x, client_y, screen_x, screen_y, operation);
seen_embedder_drag_source_ended_at_ = true;
EndSystemDragIfApplicable();
}
@@ -541,7 +546,7 @@ void BrowserPluginGuest::EndSystemDragIfApplicable() {
seen_embedder_drag_source_ended_at_ && seen_embedder_system_drag_ended_) {
RenderViewHostImpl* guest_rvh = static_cast<RenderViewHostImpl*>(
GetWebContents()->GetRenderViewHost());
- guest_rvh->DragSourceSystemDragEnded();
+ guest_rvh->GetWidget()->DragSourceSystemDragEnded();
last_drag_status_ = blink::WebDragStatusUnknown;
seen_embedder_system_drag_ended_ = false;
seen_embedder_drag_source_ended_at_ = false;

Powered by Google App Engine
This is Rietveld 408576698