| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 5 #ifndef CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
| 6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 6 #define CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, | 59 void Initialize(mojo::Connector* connector, const mojo::Identity& identity, |
| 60 uint32_t id) override; | 60 uint32_t id) override; |
| 61 bool AcceptConnection(mojo::Connection* connection) override; | 61 bool AcceptConnection(mojo::Connection* connection) override; |
| 62 | 62 |
| 63 // MojoShellConnection: | 63 // MojoShellConnection: |
| 64 mojo::Connector* GetConnector() override; | 64 mojo::Connector* GetConnector() override; |
| 65 bool UsingExternalShell() const override; | 65 bool UsingExternalShell() const override; |
| 66 void AddListener(Listener* listener) override; | 66 void AddListener(Listener* listener) override; |
| 67 void RemoveListener(Listener* listener) override; | 67 void RemoveListener(Listener* listener) override; |
| 68 | 68 |
| 69 // Blocks the calling thread until a connection to the spawning shell is | 69 // Initiates a connection to the shell. |
| 70 // established, an Application request from it is bound, and the Initialize() | 70 void ConnectToShell(mojo::ScopedMessagePipeHandle handle); |
| 71 // method on that application is called. | |
| 72 void WaitForShell(mojo::ScopedMessagePipeHandle handle); | |
| 73 | 71 |
| 74 bool external_; | 72 bool external_; |
| 75 bool initialized_; | |
| 76 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_; | 73 scoped_ptr<mojo::shell::RunnerConnection> runner_connection_; |
| 77 scoped_ptr<mojo::ShellConnection> shell_connection_; | 74 scoped_ptr<mojo::ShellConnection> shell_connection_; |
| 78 std::vector<Listener*> listeners_; | 75 std::vector<Listener*> listeners_; |
| 79 | 76 |
| 80 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); | 77 DISALLOW_COPY_AND_ASSIGN(MojoShellConnectionImpl); |
| 81 }; | 78 }; |
| 82 | 79 |
| 83 } // namespace content | 80 } // namespace content |
| 84 | 81 |
| 85 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ | 82 #endif // CONTENT_COMMON_MOJO_SHELL_CONNECTION_IMPL_H_ |
| OLD | NEW |