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

Unified Diff: mojo/edk/system/message_pipe.h

Issue 728133002: Update mojo sdk to rev e01f9a49449381a5eb430c1fd88bf2cae73ec35a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: android + ios gyp fixes Created 6 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/edk/system/message_in_transit.cc ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/edk/system/message_pipe.h
diff --git a/mojo/edk/system/message_pipe.h b/mojo/edk/system/message_pipe.h
index a52743de1523b731f952777a31d9f30bf8575800..b39e5170e7b1473444d0cc7199b27dc0e399a301 100644
--- a/mojo/edk/system/message_pipe.h
+++ b/mojo/edk/system/message_pipe.h
@@ -5,6 +5,7 @@
#ifndef MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
#define MOJO_EDK_SYSTEM_MESSAGE_PIPE_H_
+#include <stddef.h>
#include <stdint.h>
#include <vector>
@@ -13,6 +14,7 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
+#include "mojo/edk/embedder/platform_handle_vector.h"
#include "mojo/edk/system/dispatcher.h"
#include "mojo/edk/system/handle_signals_state.h"
#include "mojo/edk/system/memory.h"
@@ -25,6 +27,7 @@
namespace mojo {
namespace system {
+class Channel;
class ChannelEndpoint;
class Waiter;
@@ -55,6 +58,15 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe
// Gets the other port number (i.e., 0 -> 1, 1 -> 0).
static unsigned GetPeerPort(unsigned port);
+ // Used by |MessagePipeDispatcher::Deserialize()|. Returns true on success (in
+ // which case, |*message_pipe|/|*port| are set appropriately) and false on
+ // failure (in which case |*message_pipe| may or may not be set to null).
+ static bool Deserialize(Channel* channel,
+ const void* source,
+ size_t size,
+ scoped_refptr<MessagePipe>* message_pipe,
+ unsigned* port);
+
// Gets the type of the endpoint (used for assertions, etc.).
MessagePipeEndpoint::Type GetType(unsigned port);
@@ -84,9 +96,18 @@ class MOJO_SYSTEM_IMPL_EXPORT MessagePipe
void RemoveWaiter(unsigned port,
Waiter* waiter,
HandleSignalsState* signals_state);
-
- // This is called by the dispatcher to convert a local endpoint to a proxy
- // endpoint.
+ void StartSerialize(unsigned port,
+ Channel* channel,
+ size_t* max_size,
+ size_t* max_platform_handles);
+ bool EndSerialize(unsigned port,
+ Channel* channel,
+ void* destination,
+ size_t* actual_size,
+ embedder::PlatformHandleVector* platform_handles);
+
+ // Used by |EndSerialize()|. TODO(vtl): Remove this (merge it into
+ // |EndSerialize()|).
scoped_refptr<ChannelEndpoint> ConvertLocalToProxy(unsigned port);
// This is used by |Channel| to enqueue messages (typically to a
« no previous file with comments | « mojo/edk/system/message_in_transit.cc ('k') | mojo/edk/system/message_pipe.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698