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.
5 // Multiply-included message file, so no include guard.
10 #include "base/shared_memory.h"
11 #include "content/common/common_param_traits.h"
12 #include "ipc/ipc_message_macros.h"
13 #include "ipc/ipc_param_traits.h"
14 #include "ui/base/clipboard/clipboard.h"
16 #define IPC_MESSAGE_START ClipboardMsgStart
18 IPC_ENUM_TRAITS(ui::Clipboard::Buffer
)
20 // Clipboard IPC messages sent from the renderer to the browser.
22 // This message is used when the object list does not contain a bitmap.
23 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_WriteObjectsAsync
,
24 ui::Clipboard::ObjectMap
/* objects */)
25 // This message is used when the object list contains a bitmap.
26 // It is synchronized so that the renderer knows when it is safe to
27 // free the shared memory used to transfer the bitmap.
28 IPC_SYNC_MESSAGE_CONTROL2_0(ClipboardHostMsg_WriteObjectsSync
,
29 ui::Clipboard::ObjectMap
/* objects */,
30 base::SharedMemoryHandle
/* bitmap handle */)
31 IPC_SYNC_MESSAGE_CONTROL2_1(ClipboardHostMsg_IsFormatAvailable
,
32 std::string
/* format */,
33 ui::Clipboard::Buffer
/* buffer */,
35 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadAvailableTypes
,
36 ui::Clipboard::Buffer
/* buffer */,
37 std::vector
<string16
> /* types */,
38 bool /* contains filenames */)
39 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadText
,
40 ui::Clipboard::Buffer
/* buffer */,
41 string16
/* result */)
42 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadAsciiText
,
43 ui::Clipboard::Buffer
/* buffer */,
44 std::string
/* result */)
45 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadHTML
,
46 ui::Clipboard::Buffer
/* buffer */,
47 string16
/* markup */,
49 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadImage
,
50 ui::Clipboard::Buffer
/* buffer */,
51 base::SharedMemoryHandle
/* PNG-encoded image */,
52 uint32
/* image size */)
53 IPC_SYNC_MESSAGE_CONTROL0_1(ClipboardHostMsg_GetSequenceNumber
,
56 #if defined(OS_MACOSX)
57 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_FindPboardWriteStringAsync
,
60 IPC_SYNC_MESSAGE_CONTROL2_3(ClipboardHostMsg_ReadData
,
61 ui::Clipboard::Buffer
/* buffer */,
65 string16
/* metadata */)
66 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadFilenames
,
67 ui::Clipboard::Buffer
/* buffer */,
69 std::vector
<string16
> /* filenames */)