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

Side by Side Diff: ipc/ipc_message.h

Issue 1317093007: ipc: Make a new class PlaceholderBrokerableAttachment. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More rebase errors. 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_reader_unittest.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>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // ids of the brokerable attachments. The caller of FindNext() is 187 // ids of the brokerable attachments. The caller of FindNext() is
188 // responsible for adding the attachments to the message. 188 // responsible for adding the attachments to the message.
189 std::vector<BrokerableAttachment::AttachmentId> attachment_ids; 189 std::vector<BrokerableAttachment::AttachmentId> attachment_ids;
190 }; 190 };
191 191
192 // |info| is an output parameter and must not be nullptr. 192 // |info| is an output parameter and must not be nullptr.
193 static void FindNext(const char* range_start, 193 static void FindNext(const char* range_start,
194 const char* range_end, 194 const char* range_end,
195 NextMessageInfo* info); 195 NextMessageInfo* info);
196 196
197 // Adds a placeholder brokerable attachment that must be replaced before the
198 // message can be dispatched.
199 bool AddPlaceholderBrokerableAttachmentWithId(
200 BrokerableAttachment::AttachmentId id);
201
197 // WriteAttachment appends |attachment| to the end of the set. It returns 202 // WriteAttachment appends |attachment| to the end of the set. It returns
198 // false iff the set is full. 203 // false iff the set is full.
199 bool WriteAttachment(scoped_refptr<MessageAttachment> attachment); 204 bool WriteAttachment(scoped_refptr<MessageAttachment> attachment);
200 // ReadAttachment parses an attachment given the parsing state |iter| and 205 // ReadAttachment parses an attachment given the parsing state |iter| and
201 // writes it to |*attachment|. It returns true on success. 206 // writes it to |*attachment|. It returns true on success.
202 bool ReadAttachment(base::PickleIterator* iter, 207 bool ReadAttachment(base::PickleIterator* iter,
203 scoped_refptr<MessageAttachment>* attachment) const; 208 scoped_refptr<MessageAttachment>* attachment) const;
204 // Returns true if there are any attachment in this message. 209 // Returns true if there are any attachment in this message.
205 bool HasAttachments() const; 210 bool HasAttachments() const;
206 // Returns true if there are any MojoHandleAttachments in this message. 211 // Returns true if there are any MojoHandleAttachments in this message.
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 MSG_ROUTING_NONE = -2, 306 MSG_ROUTING_NONE = -2,
302 307
303 // indicates a general message not sent to a particular tab. 308 // indicates a general message not sent to a particular tab.
304 MSG_ROUTING_CONTROL = INT32_MAX, 309 MSG_ROUTING_CONTROL = INT32_MAX,
305 }; 310 };
306 311
307 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies 312 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies
308 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging 313 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging
309 314
310 #endif // IPC_IPC_MESSAGE_H_ 315 #endif // IPC_IPC_MESSAGE_H_
OLDNEW
« no previous file with comments | « ipc/ipc_channel_reader_unittest.cc ('k') | ipc/ipc_message.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698