Index: mojo/edk/embedder/platform_channel_pair.h |
diff --git a/mojo/edk/embedder/platform_channel_pair.h b/mojo/edk/embedder/platform_channel_pair.h |
index 74878370fa99423219894ed42ebc868d54b36fe6..80acc17c6881ab0388d2c07bc82e17a5370f1ce8 100644 |
--- a/mojo/edk/embedder/platform_channel_pair.h |
+++ b/mojo/edk/embedder/platform_channel_pair.h |
@@ -52,7 +52,9 @@ using HandlePassingInformation = base::FileHandleMappingVector; |
// platform differences in suppressing |SIGPIPE|. |
class MOJO_SYSTEM_IMPL_EXPORT PlatformChannelPair { |
public: |
- PlatformChannelPair(); |
+ // If |client_is_blocking| is true, then the client handle only supports |
+ // blocking reads and writes. The default is nonblocking. |
+ PlatformChannelPair(bool client_is_blocking = false); |
~PlatformChannelPair(); |
ScopedPlatformHandle PassServerHandle(); |
@@ -67,6 +69,10 @@ class MOJO_SYSTEM_IMPL_EXPORT PlatformChannelPair { |
static ScopedPlatformHandle PassClientHandleFromParentProcess( |
const base::CommandLine& command_line); |
+ // Like above, but gets the handle from the passed in string. |
+ static ScopedPlatformHandle PassClientHandleFromParentProcessFromString( |
+ const std::string& value); |
+ |
// Prepares to pass the client channel to a new child process, to be launched |
// using |LaunchProcess()| (from base/launch.h). Modifies |*command_line| and |
// |*handle_passing_info| as needed. |
@@ -75,6 +81,10 @@ class MOJO_SYSTEM_IMPL_EXPORT PlatformChannelPair { |
base::CommandLine* command_line, |
HandlePassingInformation* handle_passing_info) const; |
+ // Like above, but returns a string instead of changing the command line. |
+ std::string PrepareToPassClientHandleToChildProcessAsString( |
+ HandlePassingInformation* handle_passing_info) const; |
+ |
// To be called once the child process has been successfully launched, to do |
// any cleanup necessary. |
void ChildProcessLaunched(); |