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

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: use static factory methods 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 71e285717171346f5b8915eea590170182ddcd59..3020abff3d217dd9080f6d20ad24bc5e986be5b5 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"
@@ -805,7 +806,10 @@ 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,
+
+ current_drop_data_.reset(new DropData(drop_data));
+ host->FilterDropData(current_drop_data_.get());
+ host->DragTargetDragEnter(*current_drop_data_, location, location, mask,
drop_data.key_modifiers);
break;
case blink::WebDragStatusOver:
@@ -815,15 +819,19 @@ 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, drop_data.key_modifiers);
+ host->DragTargetDrop(*current_drop_data_, location, location,
+ drop_data.key_modifiers);
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