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

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

Issue 2485693003: Drag-and-drop: DragEnter, DragOver, DragLeave, DragDrop (Closed)
Patch Set: Addressed comments by 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/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..2c63ead717d945d440351a5c42e095213ba28747 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.
nasko 2016/11/10 17:33:15 nit: Put a "See https://crbug.com/xxxxxx." so we c
paulmeyer 2016/11/11 23:26:48 Done.
+ 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);

Powered by Google App Engine
This is Rietveld 408576698