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

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

Issue 1738663002: Hook embedded shell up to MojoShellConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months 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 | « content/common/BUILD.gn ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 d18d73a46575511173ec5e5110d1599df07d0dd8..dd588e02f1bb5a6308bed11f33cc94c52bf3a279 100644
--- a/content/common/mojo/mojo_shell_connection_impl.h
+++ b/content/common/mojo/mojo_shell_connection_impl.h
@@ -11,6 +11,7 @@
#include "base/memory/scoped_ptr.h"
#include "content/public/common/mojo_shell_connection.h"
#include "mojo/public/cpp/system/message_pipe.h"
+#include "mojo/shell/public/cpp/shell.h"
#include "mojo/shell/public/cpp/shell_client.h"
#include "mojo/shell/public/cpp/shell_connection.h"
@@ -32,6 +33,10 @@ class MojoShellConnectionImpl : public MojoShellConnection,
// thread. Retrieve it using MojoShellConnection::Get().
static void Create();
+ // Like above but for initializing a connection to an embedded in-process
+ // shell implementation. Binds to |request|.
+ static void Create(mojo::shell::mojom::ShellClientRequest request);
+
// 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).
@@ -47,7 +52,7 @@ class MojoShellConnectionImpl : public MojoShellConnection,
void BindToMessagePipe(mojo::ScopedMessagePipeHandle handle);
private:
- MojoShellConnectionImpl();
+ explicit MojoShellConnectionImpl(bool external);
~MojoShellConnectionImpl() override;
// mojo::ShellClient:
@@ -66,6 +71,7 @@ class MojoShellConnectionImpl : public MojoShellConnection,
// method on that application is called.
void WaitForShell(mojo::ScopedMessagePipeHandle handle);
+ bool external_;
bool initialized_;
scoped_ptr<mojo::shell::RunnerConnection> runner_connection_;
scoped_ptr<mojo::ShellConnection> shell_connection_;
« no previous file with comments | « content/common/BUILD.gn ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698