Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(670)

Unified Diff: mojo/shell/public/cpp/lib/application_runner.cc

Issue 1675083002: Rename ApplicationDelegate to ShellClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@delegate
Patch Set: . Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/public/cpp/lib/application_impl.cc ('k') | mojo/shell/public/cpp/lib/application_test_base.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « mojo/shell/public/cpp/lib/application_impl.cc ('k') | mojo/shell/public/cpp/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698