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

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

Issue 1452823003: Bind Application in renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
« no previous file with comments | « content/common/mojo/mojo_messages.h ('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 484e2ab79f6021c720d81effb403a8b25d9d54f4..8891acba7bc1e54927325891a6c4f7aa51cffe2d 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/application/public/cpp/application_delegate.h"
+#include "mojo/public/cpp/system/message_pipe.h"
namespace mojo {
namespace runner {
@@ -20,8 +21,7 @@ class RunnerConnection;
namespace content {
-// Returns true if the Chrome browser process was launched from the external
-// Mojo shell.
+// Returns true for processes launched from an external mojo shell.
bool IsRunningInMojoShell();
class MojoShellConnectionImpl : public MojoShellConnection,
@@ -32,6 +32,9 @@ class MojoShellConnectionImpl : public MojoShellConnection,
// thread until calling GetApplication() will return an Initialized()
// application with a bound ShellPtr.
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);
private:
MojoShellConnectionImpl();
@@ -50,7 +53,7 @@ class MojoShellConnectionImpl : public MojoShellConnection,
// Blocks the calling thread until a connection to the spawning shell is
// established, an Application request from it is bound, and the Initialize()
// method on that application is called.
- void WaitForShell();
+ void WaitForShell(mojo::ScopedMessagePipeHandle handle);
bool initialized_;
scoped_ptr<mojo::runner::RunnerConnection> runner_connection_;
« no previous file with comments | « content/common/mojo/mojo_messages.h ('k') | content/common/mojo/mojo_shell_connection_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698