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

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

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_view_mac.mm
diff --git a/content/browser/web_contents/web_contents_view_mac.mm b/content/browser/web_contents/web_contents_view_mac.mm
index 3055dce2be6ee27bf496649006e85e9b901b8846..45e10f241abcf126cc716c0fbbbfc2451dcbcf29 100644
--- a/content/browser/web_contents/web_contents_view_mac.mm
+++ b/content/browser/web_contents/web_contents_view_mac.mm
@@ -65,6 +65,7 @@ STATIC_ASSERT_ENUM(NSDragOperationEvery, blink::WebDragOperationEvery);
- (void)setCurrentDragOperation:(NSDragOperation)operation;
- (DropData*)dropData;
- (void)startDragWithDropData:(const DropData&)dropData
+ sourceRWH:(content::RenderWidgetHostImpl*)sourceRWH
dragOperationMask:(NSDragOperation)operationMask
image:(NSImage*)image
offset:(NSPoint)offset;
@@ -191,6 +192,7 @@ void WebContentsViewMac::StartDragging(
NSPoint offset = NSPointFromCGPoint(
gfx::PointAtOffsetFromOrigin(image_offset).ToCGPoint());
[cocoa_view_ startDragWithDropData:drop_data
+ sourceRWH:source_rwh
dragOperationMask:mask
image:gfx::NSImageFromImageSkia(image)
offset:offset];
@@ -541,19 +543,21 @@ void WebContentsViewMac::CloseTab() {
}
- (void)startDragWithDropData:(const DropData&)dropData
+ sourceRWH:(content::RenderWidgetHostImpl*)sourceRWH
dragOperationMask:(NSDragOperation)operationMask
image:(NSImage*)image
offset:(NSPoint)offset {
if (![self webContents])
return;
dragSource_.reset([[WebDragSource alloc]
- initWithContents:[self webContents]
- view:self
- dropData:&dropData
- image:image
- offset:offset
- pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard]
- dragOperationMask:operationMask]);
+ initWithContents:[self webContents]
+ view:self
+ dropData:&dropData
+ sourceRWH:sourceRWH
+ image:image
+ offset:offset
+ pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard]
+ dragOperationMask:operationMask]);
[dragSource_ startDrag];
}
« no previous file with comments | « content/browser/web_contents/web_contents_view_guest.cc ('k') | content/browser/web_contents/web_drag_dest_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698