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