Removing uses of X11 native key events.
[chromium-blink-merge.git] / content / common / clipboard_messages.h
blobadd55e4d3b4b20211b7911b521cec72d68ac865d
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
3 // found in the LICENSE file.
5 // Multiply-included message file, so no include guard.
7 #include <string>
8 #include <vector>
10 #include "base/memory/shared_memory.h"
11 #include "content/common/clipboard_format.h"
12 #include "content/public/common/common_param_traits.h"
13 #include "ipc/ipc_message_macros.h"
14 #include "ui/base/clipboard/clipboard.h"
16 #define IPC_MESSAGE_START ClipboardMsgStart
18 IPC_ENUM_TRAITS_MAX_VALUE(content::ClipboardFormat,
19 content::CLIPBOARD_FORMAT_LAST)
20 IPC_ENUM_TRAITS_MAX_VALUE(ui::ClipboardType, ui::CLIPBOARD_TYPE_LAST)
22 // Clipboard IPC messages sent from the renderer to the browser.
24 // This message is used when the object list does not contain a bitmap.
25 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_WriteObjectsAsync,
26 ui::Clipboard::ObjectMap /* objects */)
27 // This message is used when the object list contains a bitmap.
28 // It is synchronized so that the renderer knows when it is safe to
29 // free the shared memory used to transfer the bitmap.
30 IPC_SYNC_MESSAGE_CONTROL2_0(ClipboardHostMsg_WriteObjectsSync,
31 ui::Clipboard::ObjectMap /* objects */,
32 base::SharedMemoryHandle /* bitmap handle */)
33 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_GetSequenceNumber,
34 ui::ClipboardType /* type */,
35 uint64 /* result */)
36 IPC_SYNC_MESSAGE_CONTROL2_1(ClipboardHostMsg_IsFormatAvailable,
37 content::ClipboardFormat /* format */,
38 ui::ClipboardType /* type */,
39 bool /* result */)
40 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_Clear,
41 ui::ClipboardType /* type */)
42 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadAvailableTypes,
43 ui::ClipboardType /* type */,
44 std::vector<base::string16> /* types */,
45 bool /* contains filenames */)
46 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadText,
47 ui::ClipboardType /* type */,
48 base::string16 /* result */)
49 IPC_SYNC_MESSAGE_CONTROL1_4(ClipboardHostMsg_ReadHTML,
50 ui::ClipboardType /* type */,
51 base::string16 /* markup */,
52 GURL /* url */,
53 uint32 /* fragment start */,
54 uint32 /* fragment end */)
55 IPC_SYNC_MESSAGE_CONTROL1_1(ClipboardHostMsg_ReadRTF,
56 ui::ClipboardType /* type */,
57 std::string /* result */)
58 IPC_SYNC_MESSAGE_CONTROL1_2(ClipboardHostMsg_ReadImage,
59 ui::ClipboardType /* type */,
60 base::SharedMemoryHandle /* PNG-encoded image */,
61 uint32 /* image size */)
62 IPC_SYNC_MESSAGE_CONTROL2_1(ClipboardHostMsg_ReadCustomData,
63 ui::ClipboardType /* type */,
64 base::string16 /* type */,
65 base::string16 /* result */)
67 #if defined(OS_MACOSX)
68 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_FindPboardWriteStringAsync,
69 base::string16 /* text */)
70 #endif