| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 214 const char* range_end, | 214 const char* range_end, |
| 215 NextMessageInfo* info); | 215 NextMessageInfo* info); |
| 216 | 216 |
| 217 // Adds a placeholder brokerable attachment that must be replaced before the | 217 // Adds a placeholder brokerable attachment that must be replaced before the |
| 218 // message can be dispatched. | 218 // message can be dispatched. |
| 219 bool AddPlaceholderBrokerableAttachmentWithId( | 219 bool AddPlaceholderBrokerableAttachmentWithId( |
| 220 BrokerableAttachment::AttachmentId id); | 220 BrokerableAttachment::AttachmentId id); |
| 221 | 221 |
| 222 // WriteAttachment appends |attachment| to the end of the set. It returns | 222 // WriteAttachment appends |attachment| to the end of the set. It returns |
| 223 // false iff the set is full. | 223 // false iff the set is full. |
| 224 bool WriteAttachment(scoped_refptr<MessageAttachment> attachment); | 224 bool WriteAttachment( |
| 225 scoped_refptr<base::Pickle::Attachment> attachment) override; |
| 225 // ReadAttachment parses an attachment given the parsing state |iter| and | 226 // ReadAttachment parses an attachment given the parsing state |iter| and |
| 226 // writes it to |*attachment|. It returns true on success. | 227 // writes it to |*attachment|. It returns true on success. |
| 227 bool ReadAttachment(base::PickleIterator* iter, | 228 bool ReadAttachment( |
| 228 scoped_refptr<MessageAttachment>* attachment) const; | 229 base::PickleIterator* iter, |
| 230 scoped_refptr<base::Pickle::Attachment>* attachment) const override; |
| 229 // Returns true if there are any attachment in this message. | 231 // Returns true if there are any attachment in this message. |
| 230 bool HasAttachments() const; | 232 bool HasAttachments() const override; |
| 231 // Returns true if there are any MojoHandleAttachments in this message. | 233 // Returns true if there are any MojoHandleAttachments in this message. |
| 232 bool HasMojoHandles() const; | 234 bool HasMojoHandles() const; |
| 233 // Whether the message has any brokerable attachments. | 235 // Whether the message has any brokerable attachments. |
| 234 bool HasBrokerableAttachments() const; | 236 bool HasBrokerableAttachments() const; |
| 235 | 237 |
| 236 void set_sender_pid(base::ProcessId id) { sender_pid_ = id; } | 238 void set_sender_pid(base::ProcessId id) { sender_pid_ = id; } |
| 237 base::ProcessId get_sender_pid() const { return sender_pid_; } | 239 base::ProcessId get_sender_pid() const { return sender_pid_; } |
| 238 | 240 |
| 239 #ifdef IPC_MESSAGE_LOG_ENABLED | 241 #ifdef IPC_MESSAGE_LOG_ENABLED |
| 240 // Adds the outgoing time from Time::Now() at the end of the message and sets | 242 // Adds the outgoing time from Time::Now() at the end of the message and sets |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 MSG_ROUTING_NONE = -2, | 337 MSG_ROUTING_NONE = -2, |
| 336 | 338 |
| 337 // indicates a general message not sent to a particular tab. | 339 // indicates a general message not sent to a particular tab. |
| 338 MSG_ROUTING_CONTROL = INT32_MAX, | 340 MSG_ROUTING_CONTROL = INT32_MAX, |
| 339 }; | 341 }; |
| 340 | 342 |
| 341 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies | 343 #define IPC_REPLY_ID 0xFFFFFFF0 // Special message id for replies |
| 342 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging | 344 #define IPC_LOGGING_ID 0xFFFFFFF1 // Special message id for logging |
| 343 | 345 |
| 344 #endif // IPC_IPC_MESSAGE_H_ | 346 #endif // IPC_IPC_MESSAGE_H_ |
| OLD | NEW |