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

Unified Diff: mojo/edk/embedder/platform_channel_pair.h

Issue 1387963004: Create a broker interface for the new Mojo EDK so that the browser can create and duplicate messa... (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: presubmit whitespace error Created 5 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
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();

Powered by Google App Engine
This is Rietveld 408576698