Index: mojo/shell/public/cpp/lib/application_runner.cc |
diff --git a/mojo/shell/public/cpp/lib/application_runner.cc b/mojo/shell/public/cpp/lib/application_runner.cc |
index e95133e952a77589ab97971eed61653cbf2bb735..245dcd580a9e8475627aee55f25d66f3c15037a5 100644 |
--- a/mojo/shell/public/cpp/lib/application_runner.cc |
+++ b/mojo/shell/public/cpp/lib/application_runner.cc |
@@ -10,16 +10,16 @@ |
#include "base/message_loop/message_loop.h" |
#include "base/process/launch.h" |
#include "mojo/message_pump/message_pump_mojo.h" |
-#include "mojo/shell/public/cpp/application_delegate.h" |
#include "mojo/shell/public/cpp/application_impl.h" |
+#include "mojo/shell/public/cpp/shell_client.h" |
namespace mojo { |
int g_application_runner_argc; |
const char* const* g_application_runner_argv; |
-ApplicationRunner::ApplicationRunner(ApplicationDelegate* delegate) |
- : delegate_(scoped_ptr<ApplicationDelegate>(delegate)), |
+ApplicationRunner::ApplicationRunner(ShellClient* client) |
+ : client_(scoped_ptr<ShellClient>(client)), |
message_loop_type_(base::MessageLoop::TYPE_CUSTOM), |
has_run_(false) {} |
@@ -54,19 +54,19 @@ MojoResult ApplicationRunner::Run(MojoHandle application_request_handle, |
else |
loop.reset(new base::MessageLoop(message_loop_type_)); |
- ApplicationImpl impl(delegate_.get(), |
+ ApplicationImpl impl(client_.get(), |
MakeRequest<shell::mojom::Application>( |
MakeScopedHandle(MessagePipeHandle( |
application_request_handle)))); |
loop->Run(); |
- // It's very common for the delegate to cache the app and terminate on |
- // errors. If we don't delete the delegate before the app we run the risk |
- // of the delegate having a stale reference to the app and trying to use it. |
+ // It's very common for the client to cache the app and terminate on errors. |
+ // If we don't delete the client before the app we run the risk of the |
+ // client having a stale reference to the app and trying to use it. |
// Note that we destruct the message loop first because that might trigger |
// connection error handlers and they might access objects created by the |
- // delegate. |
+ // client. |
loop.reset(); |
- delegate_.reset(); |
+ client_.reset(); |
} |
return MOJO_RESULT_OK; |
} |