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 #ifndef IPC_IPC_MESSAGE_H_ | 5 #ifndef IPC_IPC_MESSAGE_H_ |
6 #define IPC_IPC_MESSAGE_H_ | 6 #define IPC_IPC_MESSAGE_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
11 | 11 |
12 #include "base/gtest_prod_util.h" | 12 #include "base/gtest_prod_util.h" |
13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
14 #include "base/pickle.h" | 14 #include "base/pickle.h" |
15 #include "base/trace_event/trace_event.h" | 15 #include "base/trace_event/trace_event.h" |
| 16 #include "ipc/attachment_broker.h" |
16 #include "ipc/brokerable_attachment.h" | 17 #include "ipc/brokerable_attachment.h" |
17 #include "ipc/ipc_export.h" | 18 #include "ipc/ipc_export.h" |
18 | 19 |
19 #if !defined(NDEBUG) | 20 #if !defined(NDEBUG) |
20 #define IPC_MESSAGE_LOG_ENABLED | 21 #define IPC_MESSAGE_LOG_ENABLED |
21 #endif | 22 #endif |
22 | 23 |
23 namespace IPC { | 24 namespace IPC { |
24 | 25 |
25 namespace internal { | 26 namespace internal { |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 friend class ChannelWin; | 262 friend class ChannelWin; |
262 friend class internal::ChannelReader; | 263 friend class internal::ChannelReader; |
263 friend class MessageReplyDeserializer; | 264 friend class MessageReplyDeserializer; |
264 friend class SyncMessage; | 265 friend class SyncMessage; |
265 | 266 |
266 #pragma pack(push, 4) | 267 #pragma pack(push, 4) |
267 struct Header : base::Pickle::Header { | 268 struct Header : base::Pickle::Header { |
268 int32_t routing; // ID of the view that this message is destined for | 269 int32_t routing; // ID of the view that this message is destined for |
269 uint32_t type; // specifies the user-defined message type | 270 uint32_t type; // specifies the user-defined message type |
270 uint32_t flags; // specifies control flags for the message | 271 uint32_t flags; // specifies control flags for the message |
271 #if defined(OS_MACOSX) | 272 #if USE_ATTACHMENT_BROKER |
272 // The number of brokered attachments included with this message. The | 273 // The number of brokered attachments included with this message. The |
273 // ids of the brokered attachment ids are sent immediately after the pickled | 274 // ids of the brokered attachment ids are sent immediately after the pickled |
274 // message, before the next pickled message is sent. | 275 // message, before the next pickled message is sent. |
275 uint32_t num_brokered_attachments; | 276 uint32_t num_brokered_attachments; |
276 #endif | 277 #endif |
277 #if defined(OS_POSIX) | 278 #if defined(OS_POSIX) |
278 uint16_t num_fds; // the number of descriptors included with this message | 279 uint16_t num_fds; // the number of descriptors included with this message |
279 uint16_t pad; // explicitly initialize this to appease valgrind | 280 uint16_t pad; // explicitly initialize this to appease valgrind |
280 #endif | 281 #endif |
281 }; | 282 }; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 MSG_ROUTING_NONE = -2, | 333 MSG_ROUTING_NONE = -2, |
333 | 334 |
334 // indicates a general message not sent to a particular tab. | 335 // indicates a general message not sent to a particular tab. |
335 MSG_ROUTING_CONTROL = INT32_MAX, | 336 MSG_ROUTING_CONTROL = INT32_MAX, |
336 }; | 337 }; |
337 | 338 |
338 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies | 339 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies |
339 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging | 340 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging |
340 | 341 |
341 #endif // IPC_IPC_MESSAGE_H_ | 342 #endif // IPC_IPC_MESSAGE_H_ |
OLD | NEW |