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 uint32_t ui::DragDropTypes::DragOperationToNSDragOperation(int drag_operation) { | |
12 uint32_t ns_drag_operation = NSDragOperationNone; | |
tapted
2016/05/11 12:36:15
and now it's safe to #include <Cocoa> this can pro
spqchan
2016/05/23 21:26:21
Done.
| |
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 |