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

Unified Diff: content/browser/web_contents/web_drag_dest_mac.mm

Issue 2485693003: Drag-and-drop: DragEnter, DragOver, DragLeave, DragDrop (Closed)
Patch Set: Rebased. More fixes. 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
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/public/browser/render_view_host.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_drag_dest_mac.mm
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index 9e595764594f79b978df8e5a44564fa30939c9e2..efeaa5cd6e82eae1d6de49b6de49fb5f41f6a32f 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -130,7 +130,9 @@ int GetModifierFlags() {
dropData.reset(new DropData());
[self populateDropData:dropData.get()
fromPasteboard:[info draggingPasteboard]];
- currentRVH_->FilterDropData(dropData.get());
+ // TODO(paulmeyer): This will need to target the correct specific
+ // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
+ currentRVH_->GetWidget()->FilterDropData(dropData.get());
NSDragOperation mask = [info draggingSourceOperationMask];
@@ -160,7 +162,9 @@ int GetModifierFlags() {
NSPoint windowPoint = [info draggingLocation];
NSPoint viewPoint = [self flipWindowPointToView:windowPoint view:view];
NSPoint screenPoint = [self flipWindowPointToScreen:windowPoint view:view];
- webContents_->GetRenderViewHost()->DragTargetDragEnter(
+ // TODO(paulmeyer): This will need to target the correct specific
+ // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
+ webContents_->GetRenderViewHost()->GetWidget()->DragTargetDragEnter(
*dropData_,
gfx::Point(viewPoint.x, viewPoint.y),
gfx::Point(screenPoint.x, screenPoint.y),
@@ -187,7 +191,9 @@ int GetModifierFlags() {
if (delegate_)
delegate_->OnDragLeave();
- webContents_->GetRenderViewHost()->DragTargetDragLeave();
+ // TODO(paulmeyer): This will need to target the correct specific
+ // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
+ webContents_->GetRenderViewHost()->GetWidget()->DragTargetDragLeave();
dropData_.reset();
}
@@ -212,7 +218,9 @@ int GetModifierFlags() {
NSPoint viewPoint = [self flipWindowPointToView:windowPoint view:view];
NSPoint screenPoint = [self flipWindowPointToScreen:windowPoint view:view];
NSDragOperation mask = [info draggingSourceOperationMask];
- webContents_->GetRenderViewHost()->DragTargetDragOver(
+ // TODO(paulmeyer): This will need to target the correct specific
+ // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
+ webContents_->GetRenderViewHost()->GetWidget()->DragTargetDragOver(
gfx::Point(viewPoint.x, viewPoint.y),
gfx::Point(screenPoint.x, screenPoint.y),
static_cast<WebDragOperationsMask>(mask),
@@ -254,7 +262,9 @@ int GetModifierFlags() {
NSPoint windowPoint = [info draggingLocation];
NSPoint viewPoint = [self flipWindowPointToView:windowPoint view:view];
NSPoint screenPoint = [self flipWindowPointToScreen:windowPoint view:view];
- webContents_->GetRenderViewHost()->DragTargetDrop(
+ // TODO(paulmeyer): This will need to target the correct specific
+ // RenderWidgetHost to work with OOPIFs. See crbug.com/647249.
+ webContents_->GetRenderViewHost()->GetWidget()->DragTargetDrop(
*dropData_, gfx::Point(viewPoint.x, viewPoint.y),
gfx::Point(screenPoint.x, screenPoint.y), GetModifierFlags());
« no previous file with comments | « content/browser/web_contents/web_contents_view_aura.cc ('k') | content/public/browser/render_view_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698