OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // IPC messages for drag and drop. | 5 // IPC messages for drag and drop. |
6 // Multiply-included message file, hence no include guard. | 6 // Multiply-included message file, hence no include guard. |
7 | 7 |
| 8 #include <utility> |
| 9 #include <vector> |
| 10 |
| 11 #include "base/strings/string16.h" |
8 #include "content/common/drag_event_source_info.h" | 12 #include "content/common/drag_event_source_info.h" |
9 #include "content/public/common/drop_data.h" | 13 #include "content/public/common/drop_data.h" |
10 #include "ipc/ipc_message_macros.h" | 14 #include "ipc/ipc_message_macros.h" |
11 #include "third_party/WebKit/public/web/WebDragOperation.h" | 15 #include "third_party/WebKit/public/web/WebDragOperation.h" |
12 #include "third_party/skia/include/core/SkBitmap.h" | 16 #include "third_party/skia/include/core/SkBitmap.h" |
13 #include "ui/gfx/geometry/point.h" | 17 #include "ui/gfx/geometry/point.h" |
14 #include "ui/gfx/geometry/vector2d.h" | 18 #include "ui/gfx/geometry/vector2d.h" |
15 | 19 |
16 #define IPC_MESSAGE_START DragMsgStart | 20 #define IPC_MESSAGE_START DragMsgStart |
17 | 21 |
18 // Messages sent from the browser to the renderer. | 22 // Messages sent from the browser to the renderer. |
19 | 23 |
20 IPC_MESSAGE_ROUTED5(DragMsg_TargetDragEnter, | 24 IPC_MESSAGE_ROUTED5(DragMsg_TargetDragEnter, |
21 content::DropData /* drop_data */, | 25 std::vector<content::MimeTypeKindPair> /* drop_data */, |
22 gfx::Point /* client_pt */, | 26 gfx::Point /* client_pt */, |
23 gfx::Point /* screen_pt */, | 27 gfx::Point /* screen_pt */, |
24 blink::WebDragOperationsMask /* ops_allowed */, | 28 blink::WebDragOperationsMask /* ops_allowed */, |
25 int /* key_modifiers */) | 29 int /* key_modifiers */) |
26 | 30 |
27 IPC_MESSAGE_ROUTED4(DragMsg_TargetDragOver, | 31 IPC_MESSAGE_ROUTED4(DragMsg_TargetDragOver, |
28 gfx::Point /* client_pt */, | 32 gfx::Point /* client_pt */, |
29 gfx::Point /* screen_pt */, | 33 gfx::Point /* screen_pt */, |
30 blink::WebDragOperationsMask /* ops_allowed */, | 34 blink::WebDragOperationsMask /* ops_allowed */, |
31 int /* key_modifiers */) | 35 int /* key_modifiers */) |
32 | 36 |
33 IPC_MESSAGE_ROUTED0(DragMsg_TargetDragLeave) | 37 IPC_MESSAGE_ROUTED0(DragMsg_TargetDragLeave) |
34 | 38 |
35 IPC_MESSAGE_ROUTED3(DragMsg_TargetDrop, | 39 IPC_MESSAGE_ROUTED4(DragMsg_TargetDrop, |
| 40 content::DropData /* drop_data */, |
36 gfx::Point /* client_pt */, | 41 gfx::Point /* client_pt */, |
37 gfx::Point /* screen_pt */, | 42 gfx::Point /* screen_pt */, |
38 int /* key_modifiers */) | 43 int /* key_modifiers */) |
39 | 44 |
40 // Notifies the renderer when and where the mouse-drag ended. | 45 // Notifies the renderer when and where the mouse-drag ended. |
41 IPC_MESSAGE_ROUTED3(DragMsg_SourceEnded, | 46 IPC_MESSAGE_ROUTED3(DragMsg_SourceEnded, |
42 gfx::Point /* client_pt */, | 47 gfx::Point /* client_pt */, |
43 gfx::Point /* screen_pt */, | 48 gfx::Point /* screen_pt */, |
44 blink::WebDragOperation /* drag_operation */) | 49 blink::WebDragOperation /* drag_operation */) |
45 | 50 |
(...skipping 10 matching lines...) Expand all Loading... |
56 content::DropData /* drop_data */, | 61 content::DropData /* drop_data */, |
57 blink::WebDragOperationsMask /* ops_allowed */, | 62 blink::WebDragOperationsMask /* ops_allowed */, |
58 SkBitmap /* image */, | 63 SkBitmap /* image */, |
59 gfx::Vector2d /* image_offset */, | 64 gfx::Vector2d /* image_offset */, |
60 content::DragEventSourceInfo /* event_info */) | 65 content::DragEventSourceInfo /* event_info */) |
61 | 66 |
62 // The page wants to update the mouse cursor during a drag & drop operation. | 67 // The page wants to update the mouse cursor during a drag & drop operation. |
63 // |is_drop_target| is true if the mouse is over a valid drop target. | 68 // |is_drop_target| is true if the mouse is over a valid drop target. |
64 IPC_MESSAGE_ROUTED1(DragHostMsg_UpdateDragCursor, | 69 IPC_MESSAGE_ROUTED1(DragHostMsg_UpdateDragCursor, |
65 blink::WebDragOperation /* drag_operation */) | 70 blink::WebDragOperation /* drag_operation */) |
OLD | NEW |