| 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 7036d33dbc6b72beff66800258d101ca20a093db..8ab9aba4525b8210892715c75cb0ea99f56d4f5e 100644
|
| --- a/mojo/application/public/cpp/application_impl.h
|
| +++ b/mojo/application/public/cpp/application_impl.h
|
| @@ -79,10 +79,14 @@ class ApplicationImpl : public Application,
|
| // Requests a new connection to an application. Returns a pointer to the
|
| // connection if the connection is permitted by this application's delegate,
|
| // or nullptr otherwise. Caller does not take ownership. The pointer remains
|
| - // valid until an error occurs on the connection with the Shell, or until the
|
| - // ApplicationImpl is destroyed, whichever occurs first.
|
| + // valid until an error occurs on the connection with the Shell, until the
|
| + // ApplicationImpl is destroyed, or until the connection is closed through a
|
| + // call to ApplicationConnection::CloseConnection.
|
| ApplicationConnection* ConnectToApplication(mojo::URLRequestPtr request);
|
|
|
| + // Closes the |connection|.
|
| + void CloseConnection(ApplicationConnection* connection);
|
| +
|
| // Connect to application identified by |request->url| and connect to the
|
| // service implementation of the interface identified by |Interface|.
|
| template <typename Interface>
|
| @@ -134,6 +138,7 @@ class ApplicationImpl : public Application,
|
| base::Closure termination_closure_;
|
| AppLifetimeHelper app_lifetime_helper_;
|
| bool quit_requested_;
|
| + bool in_destructor_;
|
| base::WeakPtrFactory<ApplicationImpl> weak_factory_;
|
|
|
| MOJO_DISALLOW_COPY_AND_ASSIGN(ApplicationImpl);
|
|
|