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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest.cc

Issue 2485693003: Drag-and-drop: DragEnter, DragOver, DragLeave, DragDrop (Closed)
Patch Set: Rebased. More fixes. 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
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 461081dc723d4c338a3248725dc4a7e8e8bcdde1..1d6931d0a4a3d74c1085e76670112c08327f32f7 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -821,28 +821,31 @@ void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id,
RenderViewHost* host = GetWebContents()->GetRenderViewHost();
auto* embedder = owner_web_contents_->GetBrowserPluginEmbedder();
DropData filtered_data(drop_data);
- host->FilterDropData(&filtered_data);
+ // TODO(paulmeyer): This will need to target the correct specific
+ // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
+ RenderWidgetHost* widget = host->GetWidget();
+ widget->FilterDropData(&filtered_data);
switch (drag_status) {
case blink::WebDragStatusEnter:
- host->DragTargetDragEnter(filtered_data, location, location, mask,
- drop_data.key_modifiers);
+ widget->DragTargetDragEnter(filtered_data, location, location, mask,
+ drop_data.key_modifiers);
// Only track the URL being dragged over the guest if the link isn't
// coming from the guest.
if (!embedder->DragEnteredGuest(this))
ignore_dragged_url_ = false;
break;
case blink::WebDragStatusOver:
- host->DragTargetDragOver(location, location, mask,
- drop_data.key_modifiers);
+ widget->DragTargetDragOver(location, location, mask,
+ drop_data.key_modifiers);
break;
case blink::WebDragStatusLeave:
embedder->DragLeftGuest(this);
- host->DragTargetDragLeave();
+ widget->DragTargetDragLeave();
ignore_dragged_url_ = true;
break;
case blink::WebDragStatusDrop:
- host->DragTargetDrop(filtered_data, location, location,
- drop_data.key_modifiers);
+ widget->DragTargetDrop(filtered_data, location, location,
+ drop_data.key_modifiers);
if (!ignore_dragged_url_ && filtered_data.url.is_valid())
delegate_->DidDropLink(filtered_data.url);
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698