Chromium Code Reviews| Index: ipc/ipc_channel.h |
| diff --git a/ipc/ipc_channel.h b/ipc/ipc_channel.h |
| index c74d084baac5a23099037e49594acbd594862c1b..14c9a0c3a098158edf80d62f36e70f745c176507 100644 |
| --- a/ipc/ipc_channel.h |
| +++ b/ipc/ipc_channel.h |
| @@ -240,6 +240,26 @@ class IPC_EXPORT Channel : public Endpoint { |
| // process such that it acts similar to if it was exec'd, for tests. |
| static void NotifyProcessForkedForTesting(); |
| #endif |
| + |
| + protected: |
| + // An OutputElement is a wrapper around a Message or raw buffer while it is |
| + // waiting to be passed to the system's underlying IPC mechanism. |
| + class OutputElement { |
| + public: |
| + // Takes ownership of message. |
| + OutputElement(Message* message); |
| + // Takes ownership of the buffer. |
|
Tom Sepez
2015/09/10 15:41:05
add note: buffer is free via system free, must be
erikchen
2015/09/10 18:43:59
Done.
|
| + OutputElement(void* buffer, size_t length); |
| + ~OutputElement(); |
| + size_t size() const; |
| + const void* data() const; |
| + const Message* get_message() const { return message_.get(); } |
| + |
| + private: |
| + scoped_ptr<const Message> message_; |
| + void* buffer_; |
| + size_t length_; |
| + }; |
| }; |
| #if defined(OS_POSIX) |