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

Unified Diff: content/common/mojo/mojo_shell_connection_impl.h

Issue 1476643002: mustash: Enable connections to mus from the Chrome renderer [take 2] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't create a RenderWidgetWindowTreeeClientFactory in tests 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: content/common/mojo/mojo_shell_connection_impl.h
diff --git a/content/common/mojo/mojo_shell_connection_impl.h b/content/common/mojo/mojo_shell_connection_impl.h
index 8891acba7bc1e54927325891a6c4f7aa51cffe2d..872ee2ba2b72141ae7b1f343e9c8525d4a5ba5c1 100644
--- a/content/common/mojo/mojo_shell_connection_impl.h
+++ b/content/common/mojo/mojo_shell_connection_impl.h
@@ -28,13 +28,22 @@ class MojoShellConnectionImpl : public MojoShellConnection,
public mojo::ApplicationDelegate {
public:
// Creates an instance of this class and stuffs it in TLS on the calling
- // thread. Retrieve it using MojoShellConnection::Get(). Blocks the calling
- // thread until calling GetApplication() will return an Initialized()
- // application with a bound ShellPtr.
+ // thread. Retrieve it using MojoShellConnection::Get().
static void Create();
- // Same as Create(), but receives a handle instead of looking for one on the
- // command line.
- static void CreateWithMessagePipe(mojo::ScopedMessagePipeHandle handle);
+
+ // Will return null if no connection has been established (either because it
+ // hasn't happened yet or the application was not spawned from the external
+ // Mojo shell).
+ static MojoShellConnectionImpl* Get();
+
+ // Blocks the calling thread until calling GetApplication() will return an
+ // Initialized() application with a bound ShellPtr. This call is a no-op
+ // if the connection has already been initialized.
+ void BindToCommandLinePlatformChannel();
+
+ // Same as BindToCommandLinePlatformChannel(), but receives a |handle| instead
+ // of looking for one on the command line.
+ void BindToMessagePipe(mojo::ScopedMessagePipeHandle handle);
private:
MojoShellConnectionImpl();

Powered by Google App Engine
This is Rietveld 408576698