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