| 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 // Multiply-included message file, so no include guard. | 5 #ifndef CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ |
| 6 #define CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ |
| 6 | 7 |
| 7 #include <stdint.h> | 8 #include <stdint.h> |
| 8 | 9 |
| 9 #include <map> | 10 #include <map> |
| 10 #include <string> | 11 #include <string> |
| 11 #include <vector> | 12 #include <vector> |
| 12 | 13 |
| 13 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 14 #include "base/memory/shared_memory.h" | 15 #include "base/memory/shared_memory.h" |
| 15 #include "base/strings/string16.h" | 16 #include "base/strings/string16.h" |
| 16 #include "build/build_config.h" | 17 #include "build/build_config.h" |
| 17 #include "content/common/clipboard_format.h" | 18 #include "content/common/clipboard_format.h" |
| 18 #include "content/common/content_export.h" | 19 #include "content/common/content_export.h" |
| 19 #include "ipc/ipc_message_macros.h" | 20 #include "ipc/ipc_message_macros.h" |
| 20 #include "ipc/param_traits_macros.h" | 21 #include "ipc/param_traits_macros.h" |
| 21 #include "ui/base/clipboard/clipboard.h" | 22 #include "ui/base/clipboard/clipboard.h" |
| 22 #include "ui/gfx/geometry/size.h" | 23 #include "ui/gfx/geometry/size.h" |
| 23 #include "url/ipc/url_param_traits.h" | 24 #include "url/ipc/url_param_traits.h" |
| 24 | 25 |
| 25 // Singly-included section for types and/or struct declarations. | 26 // Singly-included section for types and/or struct declarations. |
| 26 #ifndef CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ | 27 #ifndef INTERNAL_CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ |
| 27 #define CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ | 28 #define INTERNAL_CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ |
| 28 | 29 |
| 29 // Custom data consists of arbitrary MIME types an untrusted sender wants to | 30 // Custom data consists of arbitrary MIME types an untrusted sender wants to |
| 30 // write to the clipboard. Note that exposing a general interface to do this is | 31 // write to the clipboard. Note that exposing a general interface to do this is |
| 31 // dangerous--an untrusted sender could cause a DoS or code execution. | 32 // dangerous--an untrusted sender could cause a DoS or code execution. |
| 32 typedef std::map<base::string16, base::string16> CustomDataMap; | 33 typedef std::map<base::string16, base::string16> CustomDataMap; |
| 33 | 34 |
| 34 #endif // CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ | 35 #endif // INTERNAL_CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ |
| 35 | 36 |
| 36 #undef IPC_MESSAGE_EXPORT | 37 #undef IPC_MESSAGE_EXPORT |
| 37 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 38 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 38 | 39 |
| 39 #define IPC_MESSAGE_START ClipboardMsgStart | 40 #define IPC_MESSAGE_START ClipboardMsgStart |
| 40 | 41 |
| 41 IPC_ENUM_TRAITS_MAX_VALUE(content::ClipboardFormat, | 42 IPC_ENUM_TRAITS_MAX_VALUE(content::ClipboardFormat, |
| 42 content::CLIPBOARD_FORMAT_LAST) | 43 content::CLIPBOARD_FORMAT_LAST) |
| 43 IPC_ENUM_TRAITS_MAX_VALUE(ui::ClipboardType, ui::CLIPBOARD_TYPE_LAST) | 44 IPC_ENUM_TRAITS_MAX_VALUE(ui::ClipboardType, ui::CLIPBOARD_TYPE_LAST) |
| 44 | 45 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 IPC_SYNC_MESSAGE_CONTROL3_0(ClipboardHostMsg_WriteImage, | 106 IPC_SYNC_MESSAGE_CONTROL3_0(ClipboardHostMsg_WriteImage, |
| 106 ui::ClipboardType /* type */, | 107 ui::ClipboardType /* type */, |
| 107 gfx::Size /* size */, | 108 gfx::Size /* size */, |
| 108 base::SharedMemoryHandle /* bitmap handle */) | 109 base::SharedMemoryHandle /* bitmap handle */) |
| 109 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_CommitWrite, ui::ClipboardType /* type */) | 110 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_CommitWrite, ui::ClipboardType /* type */) |
| 110 | 111 |
| 111 #if defined(OS_MACOSX) | 112 #if defined(OS_MACOSX) |
| 112 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_FindPboardWriteStringAsync, | 113 IPC_MESSAGE_CONTROL1(ClipboardHostMsg_FindPboardWriteStringAsync, |
| 113 base::string16 /* text */) | 114 base::string16 /* text */) |
| 114 #endif | 115 #endif |
| 116 |
| 117 #endif // CONTENT_COMMON_CLIPBOARD_MESSAGES_H_ |
| OLD | NEW |