| Index: mojo/application/public/cpp/application_impl.h
|
| diff --git a/mojo/application/public/cpp/application_impl.h b/mojo/application/public/cpp/application_impl.h
|
| index e05e741144499c835e45f4357804a1c23fcb0501..b2e9675ade244a744a84ea500e26f59ddd736c23 100644
|
| --- a/mojo/application/public/cpp/application_impl.h
|
| +++ b/mojo/application/public/cpp/application_impl.h
|
| @@ -56,6 +56,20 @@ namespace mojo {
|
| //
|
| class ApplicationImpl : public Application {
|
| public:
|
| + class TestApi {
|
| + public:
|
| + explicit TestApi(ApplicationImpl* application)
|
| + : application_(application) {}
|
| +
|
| + void UnbindConnections(InterfaceRequest<Application>* application_request,
|
| + ShellPtr* shell) {
|
| + application_->UnbindConnections(application_request, shell);
|
| + }
|
| +
|
| + private:
|
| + ApplicationImpl* application_;
|
| + };
|
| +
|
| // Does not take ownership of |delegate|, which must remain valid for the
|
| // lifetime of ApplicationImpl.
|
| ApplicationImpl(ApplicationDelegate* delegate,
|
| @@ -98,24 +112,13 @@ class ApplicationImpl : public Application {
|
| connection->ConnectToService(ptr);
|
| }
|
|
|
| - // Application implementation.
|
| - void Initialize(ShellPtr shell, const mojo::String& url) override;
|
| -
|
| - // Block until the Application is initialized, if it is not already.
|
| - void WaitForInitialize();
|
| -
|
| - // Unbinds the Shell and Application connections. Can be used to re-bind the
|
| - // handles to another implementation of ApplicationImpl, for instance when
|
| - // running apptests.
|
| - void UnbindConnections(InterfaceRequest<Application>* application_request,
|
| - ShellPtr* shell);
|
| -
|
| // Initiate shutdown of this application. This may involve a round trip to the
|
| // Shell to ensure there are no inbound service requests.
|
| void Quit();
|
|
|
| private:
|
| // Application implementation.
|
| + void Initialize(ShellPtr shell, const mojo::String& url) override;
|
| void AcceptConnection(const String& requestor_url,
|
| InterfaceRequest<ServiceProvider> services,
|
| ServiceProviderPtr exposed_services,
|
| @@ -129,6 +132,12 @@ class ApplicationImpl : public Application {
|
| // from Quit() once the Shell has OK'ed shutdown.
|
| void QuitNow();
|
|
|
| + // Unbinds the Shell and Application connections. Can be used to re-bind the
|
| + // handles to another implementation of ApplicationImpl, for instance when
|
| + // running apptests.
|
| + void UnbindConnections(InterfaceRequest<Application>* application_request,
|
| + ShellPtr* shell);
|
| +
|
| // We track the lifetime of incoming connection registries as it more
|
| // convenient for the client.
|
| ScopedVector<ApplicationConnection> incoming_connections_;
|
|
|