OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "ui/base/dragdrop/drag_drop_types.h" |
| 6 |
| 7 #import <Cocoa/Cocoa.h> |
| 8 |
| 9 namespace ui { |
| 10 |
| 11 uint64_t ui::DragDropTypes::DragOperationToNSDragOperation(int drag_operation) { |
| 12 NSUInteger ns_drag_operation = NSDragOperationNone; |
| 13 |
| 14 if (drag_operation & DRAG_LINK) |
| 15 ns_drag_operation |= NSDragOperationLink; |
| 16 if (drag_operation & DRAG_COPY) |
| 17 ns_drag_operation |= NSDragOperationCopy; |
| 18 if (drag_operation & DRAG_MOVE) |
| 19 ns_drag_operation |= NSDragOperationMove; |
| 20 |
| 21 return ns_drag_operation; |
| 22 } |
| 23 |
| 24 } // namespace ui |
OLD | NEW |