| 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
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..0c1d340c52150e40e4d0f503f531d066da7f77e6
|
| --- /dev/null
|
| +++ b/ui/base/dragdrop/drag_drop_types_mac.mm
|
| @@ -0,0 +1,24 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "ui/base/dragdrop/drag_drop_types.h"
|
| +
|
| +#import <Cocoa/Cocoa.h>
|
| +
|
| +namespace ui {
|
| +
|
| +uint64_t ui::DragDropTypes::DragOperationToNSDragOperation(int drag_operation) {
|
| + NSUInteger ns_drag_operation = NSDragOperationNone;
|
| +
|
| + if (drag_operation & DRAG_LINK)
|
| + ns_drag_operation |= NSDragOperationLink;
|
| + if (drag_operation & DRAG_COPY)
|
| + ns_drag_operation |= NSDragOperationCopy;
|
| + if (drag_operation & DRAG_MOVE)
|
| + ns_drag_operation |= NSDragOperationMove;
|
| +
|
| + return ns_drag_operation;
|
| +}
|
| +
|
| +} // namespace ui
|
|
|