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

Unified Diff: mojo/services/log/cpp/log_client.h

Issue 2004493002: Add a mojo::RunApplication() for running implementations of ApplicationImplBase. (Closed) Base URL: https://github.com/domokit/mojo.git@work790_environment_no_instantiate
Patch Set: rebased Created 4 years, 7 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
Index: mojo/services/log/cpp/log_client.h
diff --git a/mojo/services/log/cpp/log_client.h b/mojo/services/log/cpp/log_client.h
index 3639307caa4100ea739f373be4c3498077bde202..049ed16a705c18a59724591835f103ea6ab69598 100644
--- a/mojo/services/log/cpp/log_client.h
+++ b/mojo/services/log/cpp/log_client.h
@@ -8,24 +8,25 @@
//
// Example application that uses this log client to talk to the log service:
//
-// class MyDelegate : public mojo::ApplicationDelegate {
+// class MyApp : public mojo::ApplicationImplBase {
// public:
-// void Initialize(mojo::ApplicationImpl* app) override {
+// void OnInitialize() override {
// LogPtr log;
-// app->ConnectToService("mojo:log", &log);
+// mojo::ConnectToService(shell(), "mojo:log", &log);
// mojo::log::InitializeLogger(std::move(log),
// mojo::Environment::GetDefaultLogger());
// mojo::Environment::SetDefaultLogger(mojo::log::GetLogger());
// }
//
-// void Quit() {
+// void OnQuit() override {
// mojo::log::DestroyLogger();
// }
// };
//
// MojoResult MojoMain(MojoHandle app_request) {
-// mojo::ApplicationRunner runner(new MyDelegate);
-// return runner.Run(app_request);
+// MyApp app;
+// mojo::RunApplication(&app);
+// return MOJO_RESULT_OK;
// }
#ifndef MOJO_SERVICES_LOG_CPP_LOG_CLIENT_H_
« no previous file with comments | « mojo/public/cpp/bindings/tests/versioning_test_service.cc ('k') | services/test_service/test_request_tracker_application.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698