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

Unified Diff: services/native_viewport/main.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 | « services/native_viewport/app_delegate.cc ('k') | services/native_viewport/native_viewport_app.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/native_viewport/main.cc
diff --git a/services/native_viewport/main.cc b/services/native_viewport/main.cc
index cff828bb1306a10b24d922082d583d8c4b228bb3..76959f88327ba302051a26b965ec1050b87f130d 100644
--- a/services/native_viewport/main.cc
+++ b/services/native_viewport/main.cc
@@ -2,20 +2,25 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "mojo/application/run_application_options_chromium.h"
+#include "mojo/environment/scoped_chromium_init.h"
+#include "mojo/public/c/system/main.h"
+#include "mojo/public/cpp/application/run_application.h"
+
#if defined(USE_OZONE)
-#include "services/native_viewport/ozone/app_delegate_ozone.h"
+#include "services/native_viewport/ozone/native_viewport_app_ozone.h"
#else
-#include "services/native_viewport/app_delegate.h"
+#include "services/native_viewport/native_viewport_app.h"
#endif
MojoResult MojoMain(MojoHandle application_request) {
+ mojo::ScopedChromiumInit init;
#if defined(USE_OZONE)
- mojo::ApplicationRunnerChromium runner(
- new native_viewport::NativeViewportOzoneAppDelegate);
+ native_viewport::NativeViewportAppOzone native_viewport_app;
#else
- mojo::ApplicationRunnerChromium runner(
- new native_viewport::NativeViewportAppDelegate);
+ native_viewport::NativeViewportApp native_viewport_app;
#endif
- runner.set_message_loop_type(base::MessageLoop::TYPE_UI);
- return runner.Run(application_request);
+ mojo::RunApplicationOptionsChromium options(base::MessageLoop::TYPE_UI);
+ return mojo::RunApplication(application_request, &native_viewport_app,
+ &options);
}
« no previous file with comments | « services/native_viewport/app_delegate.cc ('k') | services/native_viewport/native_viewport_app.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698