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

Unified Diff: examples/indirect_service/indirect_service_demo.cc

Issue 2011383002: Get rid of {Run,Terminate}MainApplication(), and more ApplicationDelegate conversion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
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
« no previous file with comments | « examples/indirect_service/indirect_integer_service.cc ('k') | examples/indirect_service/integer_service.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: examples/indirect_service/indirect_service_demo.cc
diff --git a/examples/indirect_service/indirect_service_demo.cc b/examples/indirect_service/indirect_service_demo.cc
index 313b5c400775c359c8bdb03de1f27695100c42fb..ad4770170bb91ca41400170fc1284337007a9365 100644
--- a/examples/indirect_service/indirect_service_demo.cc
+++ b/examples/indirect_service/indirect_service_demo.cc
@@ -9,6 +9,7 @@
#include "base/threading/thread.h"
#include "base/time/time.h"
#include "examples/indirect_service/indirect_service_demo.mojom.h"
+#include "mojo/environment/scoped_chromium_init.h"
#include "mojo/message_pump/message_pump_mojo.h"
#include "mojo/public/c/system/main.h"
#include "mojo/public/cpp/application/application_impl_base.h"
@@ -139,7 +140,7 @@ class IndirectServiceDemoApp : public ApplicationImplBase {
tasks_.erase(std::remove(tasks_.begin(), tasks_.end(), task), tasks_.end());
delete task; // Stop the DemoTask's thread etc.
if (tasks_.empty())
- TerminateMainApplication(MOJO_RESULT_OK);
+ TerminateApplication(MOJO_RESULT_OK);
}
IndirectIntegerServicePtr indirect_integer_service_;
@@ -150,7 +151,7 @@ class IndirectServiceDemoApp : public ApplicationImplBase {
} // namespace mojo
MojoResult MojoMain(MojoHandle application_request) {
+ mojo::ScopedChromiumInit init;
mojo::examples::IndirectServiceDemoApp indirect_service_demo_app;
- return mojo::RunMainApplication(application_request,
- &indirect_service_demo_app);
+ return mojo::RunApplication(application_request, &indirect_service_demo_app);
}
« no previous file with comments | « examples/indirect_service/indirect_integer_service.cc ('k') | examples/indirect_service/integer_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698