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

Unified Diff: ui/base/dragdrop/drag_drop_types_mac.mm

Issue 2307633002: [MacViews] Fix Drag and Drop bugs (Closed)
Patch Set: Fixed test 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.h ('k') | ui/views/cocoa/drag_drop_client_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/dragdrop/drag_drop_types_mac.mm
diff --git a/ui/base/dragdrop/drag_drop_types_mac.mm b/ui/base/dragdrop/drag_drop_types_mac.mm
index 0c1d340c52150e40e4d0f503f531d066da7f77e6..dd0226e29fc4475e8ad64c6e9efd00d0b1a407ec 100644
--- a/ui/base/dragdrop/drag_drop_types_mac.mm
+++ b/ui/base/dragdrop/drag_drop_types_mac.mm
@@ -21,4 +21,18 @@ uint64_t ui::DragDropTypes::DragOperationToNSDragOperation(int drag_operation) {
return ns_drag_operation;
}
+int ui::DragDropTypes::NSDragOperationToDragOperation(
+ uint64_t ns_drag_operation) {
+ NSUInteger drag_operation = DRAG_NONE;
+
+ if (ns_drag_operation & NSDragOperationLink)
+ drag_operation |= DRAG_LINK;
+ if (ns_drag_operation & NSDragOperationCopy)
+ drag_operation |= DRAG_COPY;
+ if (ns_drag_operation & NSDragOperationMove)
+ drag_operation |= DRAG_MOVE;
+
+ return drag_operation;
+}
+
} // namespace ui
« no previous file with comments | « ui/base/dragdrop/drag_drop_types.h ('k') | ui/views/cocoa/drag_drop_client_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698