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 9bd0df203d2d3eb192f6d516d5d3ddb9446c70ab..1f24161d3ff2a8e203149f9940357d8f1cc4f4e1 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" |
@@ -799,13 +800,11 @@ void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id, |
const gfx::Point& location) { |
RenderViewHost* host = GetWebContents()->GetRenderViewHost(); |
auto embedder = owner_web_contents_->GetBrowserPluginEmbedder(); |
+ DropData filtered_data(drop_data); |
+ host->FilterDropData(&filtered_data); |
switch (drag_status) { |
case blink::WebDragStatusEnter: |
- // Only track the URL being dragged over the guest if the link isn't |
- // coming from the guest. |
- if (!embedder->DragEnteredGuest(this)) |
- dragged_url_ = drop_data.url; |
- host->DragTargetDragEnter(drop_data, location, location, mask, |
+ host->DragTargetDragEnter(filtered_data, location, location, mask, |
drop_data.key_modifiers); |
break; |
case blink::WebDragStatusOver: |
@@ -817,7 +816,13 @@ void BrowserPluginGuest::OnDragStatusUpdate(int browser_plugin_instance_id, |
host->DragTargetDragLeave(); |
break; |
case blink::WebDragStatusDrop: |
- host->DragTargetDrop(location, location, 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)) |
lazyboy
2016/05/31 22:21:22
Hmm, this doesn't seem quite right, at this point
hush (inactive)
2016/06/04 01:41:45
Right. I found link dropping in chrome://chrome-si
|
+ dragged_url_ = drop_data.url; |
lfg
2016/05/31 21:30:42
Do we still need dragged_url_ as a member?
hush (inactive)
2016/06/04 01:41:45
No. I will remove it in the next patch set.
|
+ |
+ host->DragTargetDrop(filtered_data, location, location, |
+ drop_data.key_modifiers); |
if (dragged_url_.is_valid()) { |
delegate_->DidDropLink(dragged_url_); |
dragged_url_ = GURL(); |