Index: ui/views/cocoa/drag_drop_client_mac.mm |
diff --git a/ui/views/cocoa/drag_drop_client_mac.mm b/ui/views/cocoa/drag_drop_client_mac.mm |
index 83b70ed948f4c76c3bf142c87b179bbe698fc525..f2b77998edb4a177aca2703b3d8690e4a464a4b8 100644 |
--- a/ui/views/cocoa/drag_drop_client_mac.mm |
+++ b/ui/views/cocoa/drag_drop_client_mac.mm |
@@ -132,6 +132,8 @@ NSDragOperation DragDropClientMac::DragUpdate(id<NSDraggingInfo> sender) { |
if (!data_source_.get()) { |
data_source_.reset([[CocoaDragDropDataProvider alloc] |
initWithPasteboard:[sender draggingPasteboard]]); |
+ operation_ = ui::DragDropTypes::NSDragOperationToDragOperation( |
+ [sender draggingSourceOperationMask]); |
} |
drag_operation = drop_helper_.OnDragOver( |
@@ -144,6 +146,8 @@ NSDragOperation DragDropClientMac::Drop(id<NSDraggingInfo> sender) { |
int drag_operation = drop_helper_.OnDrop( |
*[data_source_ data], LocationInView([sender draggingLocation]), |
operation_); |
+ data_source_.reset(); |
+ operation_ = 0; |
return ui::DragDropTypes::DragOperationToNSDragOperation(drag_operation); |
} |