OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/browser/web_contents/web_drag_utils_win.h" | 5 #include "content/browser/web_contents/web_drag_utils_win.h" |
6 | 6 |
7 #include <oleidl.h> | 7 #include <oleidl.h> |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 | 9 |
10 using WebKit::WebDragOperation; | 10 using blink::WebDragOperation; |
11 using WebKit::WebDragOperationsMask; | 11 using blink::WebDragOperationsMask; |
12 using WebKit::WebDragOperationNone; | 12 using blink::WebDragOperationNone; |
13 using WebKit::WebDragOperationCopy; | 13 using blink::WebDragOperationCopy; |
14 using WebKit::WebDragOperationLink; | 14 using blink::WebDragOperationLink; |
15 using WebKit::WebDragOperationMove; | 15 using blink::WebDragOperationMove; |
16 using WebKit::WebDragOperationGeneric; | 16 using blink::WebDragOperationGeneric; |
17 | 17 |
18 namespace content { | 18 namespace content { |
19 | 19 |
20 WebDragOperation WinDragOpToWebDragOp(DWORD effect) { | 20 WebDragOperation WinDragOpToWebDragOp(DWORD effect) { |
21 DCHECK(effect == DROPEFFECT_NONE || effect == DROPEFFECT_COPY || | 21 DCHECK(effect == DROPEFFECT_NONE || effect == DROPEFFECT_COPY || |
22 effect == DROPEFFECT_LINK || effect == DROPEFFECT_MOVE); | 22 effect == DROPEFFECT_LINK || effect == DROPEFFECT_MOVE); |
23 | 23 |
24 return WinDragOpMaskToWebDragOpMask(effect); | 24 return WinDragOpMaskToWebDragOpMask(effect); |
25 } | 25 } |
26 | 26 |
(...skipping 24 matching lines...) Expand all Loading... |
51 if (ops & WebDragOperationCopy) | 51 if (ops & WebDragOperationCopy) |
52 win_ops |= DROPEFFECT_COPY; | 52 win_ops |= DROPEFFECT_COPY; |
53 if (ops & WebDragOperationLink) | 53 if (ops & WebDragOperationLink) |
54 win_ops |= DROPEFFECT_LINK; | 54 win_ops |= DROPEFFECT_LINK; |
55 if (ops & (WebDragOperationMove | WebDragOperationGeneric)) | 55 if (ops & (WebDragOperationMove | WebDragOperationGeneric)) |
56 win_ops |= DROPEFFECT_MOVE; | 56 win_ops |= DROPEFFECT_MOVE; |
57 return win_ops; | 57 return win_ops; |
58 } | 58 } |
59 | 59 |
60 } // namespace content | 60 } // namespace content |
OLD | NEW |