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 9c040131f4a1a2c60eb26ccab85120f773a2ff35..5d2eb45f64b5ae66a46a7c4b591db70b39835ff6 100644 |
--- a/mojo/application/public/cpp/application_impl.h |
+++ b/mojo/application/public/cpp/application_impl.h |
@@ -19,6 +19,7 @@ |
namespace mojo { |
+// TODO(beng): This comment is hilariously out of date. |
// Utility class for communicating with the Shell, and providing Services |
// to clients. |
// |
@@ -59,8 +60,8 @@ class ApplicationImpl : public Application { |
ApplicationImpl(ApplicationDelegate* delegate, |
InterfaceRequest<Application> request); |
// Constructs an ApplicationImpl with a custom termination closure. This |
- // closure is invoked on Terminate() instead of the default behavior of |
- // quitting the current MessageLoop. |
+ // closure is invoked on Quit() instead of the default behavior of quitting |
+ // the current base::MessageLoop. |
ApplicationImpl(ApplicationDelegate* delegate, |
InterfaceRequest<Application> request, |
const Closure& termination_closure); |
@@ -113,12 +114,9 @@ class ApplicationImpl : public Application { |
void UnbindConnections(InterfaceRequest<Application>* application_request, |
ShellPtr* shell); |
- // Quits the main run loop for this application. It first checks with the |
- // shell to ensure there are no outstanding service requests. |
- void Terminate(); |
- |
- // Quits without waiting to check with the shell. |
- void QuitNow(); |
+ // 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. |
@@ -133,6 +131,10 @@ class ApplicationImpl : public Application { |
void ClearConnections(); |
+ // Called from Quit() when there is no Shell connection, or asynchronously |
+ // from Quit() once the Shell has OK'ed shutdown. |
+ void QuitNow(); |
+ |
typedef std::vector<internal::ServiceRegistry*> ServiceRegistryList; |
ServiceRegistryList incoming_service_registries_; |