Chromium Code Reviews| Index: mojo/system/message_in_transit.h |
| diff --git a/mojo/system/message_in_transit.h b/mojo/system/message_in_transit.h |
| index c2cfed4b0f73f629c75347422e0d957976f39d15..1595c0643fddffd56baa689045c2dfbc28385ce8 100644 |
| --- a/mojo/system/message_in_transit.h |
| +++ b/mojo/system/message_in_transit.h |
| @@ -48,9 +48,19 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit { |
| uint32_t num_bytes, |
| uint32_t num_handles); |
| - // Destroys a |MessageInTransit| created using |Create()|. |
| + MessageInTransit* Clone() const; |
| + |
| + // Destroys a |MessageInTransit| created using |Create()| or |Clone()|. |
| void Destroy(); |
| + const void* main_buffer() const { |
|
yzshen1
2014/02/19 23:15:59
Please consider adding a comment about what is a m
viettrungluu
2014/02/19 23:23:36
Done.
|
| + return static_cast<const void*>(this); |
| + } |
| + |
| + size_t main_buffer_size() const { |
| + return RoundUpMessageAlignment(sizeof(*this) + header()->data_size); |
| + } |
| + |
| // Gets the size of the data (in number of bytes). This is the full size of |
| // the data that follows the header, and may include data other than the |
| // message data. (See also |num_bytes()|.) |
| @@ -77,10 +87,6 @@ class MOJO_SYSTEM_IMPL_EXPORT MessageInTransit { |
| return header()->num_handles; |
| } |
| - size_t size_with_header_and_padding() const { |
| - return RoundUpMessageAlignment(sizeof(*this) + header()->data_size); |
| - } |
| - |
| Type type() const { return header()->type; } |
| Subtype subtype() const { return header()->subtype; } |
| EndpointId source_id() const { return header()->source_id; } |