diff options
author | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-09 01:15:52 +0000 |
---|---|---|
committer | viettrungluu@chromium.org <viettrungluu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-04-09 01:15:52 +0000 |
commit | 1f06f8403fc657da214b0f0ef20c4952aa642c2b (patch) | |
tree | 3746335932c6bfa614a96e4bea4649f2387c6d0d /mojo/system/message_pipe_dispatcher.cc | |
parent | 7b4625bc018036a315a799df6260c72807ad7ddf (diff) | |
download | chromium_src-1f06f8403fc657da214b0f0ef20c4952aa642c2b.zip chromium_src-1f06f8403fc657da214b0f0ef20c4952aa642c2b.tar.gz chromium_src-1f06f8403fc657da214b0f0ef20c4952aa642c2b.tar.bz2 |
Mojo: Allow dispatchers to attach PlatformHandles to the MessageInTransit on serialization.
They still won't get transmitted, and nothing is done on the
deserialization end.
R=sky@chromium.org
Review URL: https://codereview.chromium.org/227383006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262580 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/system/message_pipe_dispatcher.cc')
-rw-r--r-- | mojo/system/message_pipe_dispatcher.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/mojo/system/message_pipe_dispatcher.cc b/mojo/system/message_pipe_dispatcher.cc index a22b3a7..3559131 100644 --- a/mojo/system/message_pipe_dispatcher.cc +++ b/mojo/system/message_pipe_dispatcher.cc @@ -172,15 +172,20 @@ void MessagePipeDispatcher::RemoveWaiterImplNoLock(Waiter* waiter) { message_pipe_->RemoveWaiter(port_, waiter); } -size_t MessagePipeDispatcher::GetMaximumSerializedSizeImplNoLock( - const Channel* /*channel*/) const { +void MessagePipeDispatcher::StartSerializeImplNoLock( + Channel* /*channel*/, + size_t* max_size, + size_t* max_platform_handles) { DCHECK(HasOneRef()); // Only one ref => no need to take the lock. - return sizeof(SerializedMessagePipeDispatcher); + *max_size = sizeof(SerializedMessagePipeDispatcher); + *max_platform_handles = 0; } -bool MessagePipeDispatcher::SerializeAndCloseImplNoLock(Channel* channel, - void* destination, - size_t* actual_size) { +bool MessagePipeDispatcher::EndSerializeAndCloseImplNoLock( + Channel* channel, + void* destination, + size_t* actual_size, + std::vector<embedder::PlatformHandle>* platform_handles) { DCHECK(HasOneRef()); // Only one ref => no need to take the lock. // Convert the local endpoint to a proxy endpoint (moving the message queue). |