Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(75)

Side by Side Diff: ipc/ipc_message.h

Issue 1334593002: Reland #2 "ipc: Add a new field num_brokered_attachments to the message header." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and type error. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/pickle.h" 13 #include "base/pickle.h"
14 #include "base/trace_event/trace_event.h" 14 #include "base/trace_event/trace_event.h"
15 #include "ipc/attachment_broker.h"
15 #include "ipc/brokerable_attachment.h" 16 #include "ipc/brokerable_attachment.h"
16 #include "ipc/ipc_export.h" 17 #include "ipc/ipc_export.h"
17 18
18 #if !defined(NDEBUG) 19 #if !defined(NDEBUG)
19 #define IPC_MESSAGE_LOG_ENABLED 20 #define IPC_MESSAGE_LOG_ENABLED
20 #endif 21 #endif
21 22
22 namespace IPC { 23 namespace IPC {
23 24
24 namespace internal { 25 namespace internal {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
244 friend class ChannelWin; 245 friend class ChannelWin;
245 friend class internal::ChannelReader; 246 friend class internal::ChannelReader;
246 friend class MessageReplyDeserializer; 247 friend class MessageReplyDeserializer;
247 friend class SyncMessage; 248 friend class SyncMessage;
248 249
249 #pragma pack(push, 4) 250 #pragma pack(push, 4)
250 struct Header : base::Pickle::Header { 251 struct Header : base::Pickle::Header {
251 int32_t routing; // ID of the view that this message is destined for 252 int32_t routing; // ID of the view that this message is destined for
252 uint32_t type; // specifies the user-defined message type 253 uint32_t type; // specifies the user-defined message type
253 uint32_t flags; // specifies control flags for the message 254 uint32_t flags; // specifies control flags for the message
255 #if USE_ATTACHMENT_BROKER
256 // The number of brokered attachments included with this message. The
257 // ids of the brokered attachment ids are sent immediately after the pickled
258 // message, before the next pickled message is sent.
259 uint32_t num_brokered_attachments;
260 #endif
254 #if defined(OS_POSIX) 261 #if defined(OS_POSIX)
255 uint16_t num_fds; // the number of descriptors included with this message 262 uint16_t num_fds; // the number of descriptors included with this message
256 uint16_t pad; // explicitly initialize this to appease valgrind 263 uint16_t pad; // explicitly initialize this to appease valgrind
257 #endif 264 #endif
258 }; 265 };
259 #pragma pack(pop) 266 #pragma pack(pop)
260 267
261 Header* header() { 268 Header* header() {
262 return headerT<Header>(); 269 return headerT<Header>();
263 } 270 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 MSG_ROUTING_NONE = -2, 313 MSG_ROUTING_NONE = -2,
307 314
308 // indicates a general message not sent to a particular tab. 315 // indicates a general message not sent to a particular tab.
309 MSG_ROUTING_CONTROL = INT32_MAX, 316 MSG_ROUTING_CONTROL = INT32_MAX,
310 }; 317 };
311 318
312 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies 319 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies
313 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging 320 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging
314 321
315 #endif // IPC_IPC_MESSAGE_H_ 322 #endif // IPC_IPC_MESSAGE_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_win.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698