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; |