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

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 chromeos compile + interactive test 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
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « components/test_runner/event_sender.cc ('k') | content/browser/renderer_host/render_view_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698