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

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 2509933002: Drag-and-drop: Target drag messages (the sequel). (Closed)
Patch Set: Addressed additional comments by avi@, dcheng@. Created 4 years, 1 month 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/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 86257b48c45cb766d5dd5f20f7056b88c1bc4b9d..64f96bcedbcf570538ba04e692b300d733509f32 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -80,6 +80,7 @@
#include "content/browser/webui/web_ui_impl.h"
#include "content/common/browser_plugin/browser_plugin_constants.h"
#include "content/common/browser_plugin/browser_plugin_messages.h"
+#include "content/common/drag_messages.h"
#include "content/common/frame_messages.h"
#include "content/common/input_messages.h"
#include "content/common/page_messages.h"
@@ -2963,10 +2964,16 @@ void WebContentsImpl::DragSourceEndedAt(int client_x,
int client_y,
int screen_x,
int screen_y,
- blink::WebDragOperation operation) {
+ blink::WebDragOperation operation,
+ RenderWidgetHost* source_rwh) {
if (browser_plugin_embedder_.get())
browser_plugin_embedder_->DragSourceEndedAt(
client_x, client_y, screen_x, screen_y, operation);
+ if (source_rwh) {
+ source_rwh->DragSourceEndedAt(gfx::Point(client_x, client_y),
+ gfx::Point(screen_x, screen_y),
+ operation);
+ }
}
void WebContentsImpl::LoadStateChanged(
@@ -3017,11 +3024,9 @@ void WebContentsImpl::NotifyWebContentsFocused() {
observer.OnWebContentsFocused();
}
-void WebContentsImpl::SystemDragEnded() {
- // TODO(paulmeyer): This will need to target the correct specific RWH to work
- // with OOPIF.
- if (GetRenderViewHost())
- GetRenderViewHost()->GetWidget()->DragSourceSystemDragEnded();
+void WebContentsImpl::SystemDragEnded(RenderWidgetHost* source_rwh) {
+ if (source_rwh)
+ source_rwh->DragSourceSystemDragEnded();
if (browser_plugin_embedder_.get())
browser_plugin_embedder_->SystemDragEnded();
}
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698