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

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

Issue 1723763002: Add WebDragData to blink::WebView::dragtargetDrop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile on aura Created 4 years, 7 months 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 0d0235834ddbe0b1224750dee71d58c41f2861b7..f9c0817430bf73160ec37dcca3ffd58f97130a40 100644
--- a/content/browser/browser_plugin/browser_plugin_guest.cc
+++ b/content/browser/browser_plugin/browser_plugin_guest.cc
@@ -42,6 +42,7 @@
#include "content/public/browser/browser_plugin_guest_manager.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/guest_host.h"
+#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/user_metrics.h"
#include "content/public/browser/web_contents_observer.h"
@@ -804,7 +805,11 @@ void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id,
// coming from the guest.
if (!embedder->DragEnteredGuest(this))
dragged_url_ = drop_data.url;
- host->DragTargetDragEnter(drop_data, location, location, mask, 0);
+
+ current_drop_data_.reset(new DropData(drop_data));
+ host->FilterDropData(current_drop_data_.get());
+ host->DragTargetDragEnter(*current_drop_data_, location, location, mask,
+ 0);
break;
case blink::WebDragStatusOver:
host->DragTargetDragOver(location, location, mask, 0);
@@ -812,15 +817,18 @@ void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id,
case blink::WebDragStatusLeave:
embedder->DragLeftGuest(this);
host->DragTargetDragLeave();
+ current_drop_data_.reset();
break;
case blink::WebDragStatusDrop:
- host->DragTargetDrop(location, location, 0);
+ host->DragTargetDrop(*current_drop_data_, location, location, 0);
if (dragged_url_.is_valid()) {
delegate_->DidDropLink(dragged_url_);
dragged_url_ = GURL();
}
+ current_drop_data_.reset();
break;
case blink::WebDragStatusUnknown:
+ current_drop_data_.reset();
NOTREACHED();
}
last_drag_status_ = drag_status;

Powered by Google App Engine
This is Rietveld 408576698