OLD | NEW |
| (Empty) |
1 // Copyright (c) 2011 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 // Multiply-included message file, so no include guard. | |
6 | |
7 #include <string> | |
8 #include <vector> | |
9 | |
10 #include "content/common/common_param_traits.h" | |
11 #include "ipc/ipc_message_macros.h" | |
12 #include "ipc/ipc_param_traits.h" | |
13 #include "ui/base/clipboard/clipboard.h" | |
14 | |
15 #define IPC_MESSAGE_START ClipboardMsgStart | |
16 | |
17 IPC_ENUM_TRAITS(ui::Clipboard::Buffer) | |
18 | |
19 // Clipboard IPC messages sent from the renderer to the browser. | |
20 | |
21 // This message is used when the object list does not contain a bitmap. | |
22 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_WriteObjectsAsync, | |
23 ui::Clipboard::ObjectMap /* objects */) | |
24 // This message is used when the object list contains a bitmap. | |
25 // It is synchronized so that the renderer knows when it is safe to | |
26 // free the shared memory used to transfer the bitmap. | |
27 IPC_SYNC_MESSAGE_CONTROL2_0(ClipboardHostMsg_WriteObjectsSync, | |
28 ui::Clipboard::ObjectMap /* objects */, | |
29 base::SharedMemoryHandle /* bitmap handle */) | |
30 IPC_SYNC_MESSAGE_CONTROL2_1(ClipboardHostMsg_IsFormatAvailable, | |
31 std::string /* format */, | |
32 ui::Clipboard::Buffer /* buffer */, | |
33 bool /* result */) | |
34 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadAvailableTypes, | |
35 ui::Clipboard::Buffer /* buffer */, | |
36 std::vector<string16> /* types */, | |
37 bool /* contains filenames */) | |
38 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadText, | |
39 ui::Clipboard::Buffer /* buffer */, | |
40 string16 /* result */) | |
41 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadAsciiText, | |
42 ui::Clipboard::Buffer /* buffer */, | |
43 std::string /* result */) | |
44 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadHTML, | |
45 ui::Clipboard::Buffer /* buffer */, | |
46 string16 /* markup */, | |
47 GURL /* url */) | |
48 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadImage, | |
49 ui::Clipboard::Buffer /* buffer */, | |
50 std::string /* PNG-encoded image */) | |
51 #if defined(OS_MACOSX) | |
52 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_FindPboardWriteStringAsync, | |
53 string16 /* text */) | |
54 #endif | |
55 IPC_SYNC_MESSAGE_CONTROL2_3(ClipboardHostMsg_ReadData, | |
56 ui::Clipboard::Buffer /* buffer */, | |
57 string16 /* type */, | |
58 bool /* succeeded */, | |
59 string16 /* data */, | |
60 string16 /* metadata */) | |
61 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadFilenames, | |
62 ui::Clipboard::Buffer /* buffer */, | |
63 bool /* result */, | |
64 std::vector<string16> /* filenames */) | |
OLD | NEW |