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

Unified Diff: ui/views/cocoa/drag_drop_client_mac.mm

Issue 2307633002: [MacViews] Fix Drag and Drop bugs (Closed)
Patch Set: Created 4 years, 3 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 | « ui/base/dragdrop/drag_drop_types_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..8b018fd568e609be7c4e07385f1800fe2ac5c111 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,7 @@ NSDragOperation DragDropClientMac::Drop(id<NSDraggingInfo> sender) {
int drag_operation = drop_helper_.OnDrop(
*[data_source_ data], LocationInView([sender draggingLocation]),
operation_);
+ data_source_.reset();
return ui::DragDropTypes::DragOperationToNSDragOperation(drag_operation);
}
« no previous file with comments | « ui/base/dragdrop/drag_drop_types_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698