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

Side by Side Diff: ui/base/dragdrop/drag_drop_types_mac.mm

Issue 1964283002: MacViews: Implemented Drag & Drop (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot to add the test Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698