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

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

Issue 1793793002: Remove ShellConnection::WaitForInitialize (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
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 5f5336349e3d1893436721640ad6913fcf113d10..f11a22ac4b4a31c376f088e6b170c02e521d9657 100644
--- a/content/common/mojo/mojo_shell_connection_impl.h
+++ b/content/common/mojo/mojo_shell_connection_impl.h
@@ -42,21 +42,18 @@ class MojoShellConnectionImpl : public MojoShellConnection,
// 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);
+ // Connects to the shell over a given ShellClientFactory request. If |request|
+ // is null, this attempts to extract a request pipe from the command line.
+ // This must only be called once.
+ void Connect(mojo::shell::mojom::ShellClientFactoryRequest request);
private:
explicit MojoShellConnectionImpl(bool external);
~MojoShellConnectionImpl() override;
// mojo::ShellClient:
- void Initialize(mojo::Connector* connector, const mojo::Identity& identity,
+ void Initialize(mojo::Connector* connector,
+ const mojo::Identity& identity,
uint32_t id) override;
bool AcceptConnection(mojo::Connection* connection) override;
@@ -66,15 +63,9 @@ class MojoShellConnectionImpl : public MojoShellConnection,
void AddListener(Listener* listener) override;
void RemoveListener(Listener* listener) override;
- // 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(mojo::ScopedMessagePipeHandle handle);
-
bool external_;
- bool initialized_;
- scoped_ptr<mojo::shell::RunnerConnection> runner_connection_;
scoped_ptr<mojo::ShellConnection> shell_connection_;
+ scoped_ptr<mojo::shell::RunnerConnection> runner_connection_;
std::vector<Listener*> listeners_;
DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl);

Powered by Google App Engine
This is Rietveld 408576698