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

Side by Side 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, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "mojo/application/run_application_options_chromium.h"
6 #include "mojo/environment/scoped_chromium_init.h"
7 #include "mojo/public/c/system/main.h"
8 #include "mojo/public/cpp/application/run_application.h"
9
5 #if defined(USE_OZONE) 10 #if defined(USE_OZONE)
6 #include "services/native_viewport/ozone/app_delegate_ozone.h" 11 #include "services/native_viewport/ozone/native_viewport_app_ozone.h"
7 #else 12 #else
8 #include "services/native_viewport/app_delegate.h" 13 #include "services/native_viewport/native_viewport_app.h"
9 #endif 14 #endif
10 15
11 MojoResult MojoMain(MojoHandle application_request) { 16 MojoResult MojoMain(MojoHandle application_request) {
17 mojo::ScopedChromiumInit init;
12 #if defined(USE_OZONE) 18 #if defined(USE_OZONE)
13 mojo::ApplicationRunnerChromium runner( 19 native_viewport::NativeViewportAppOzone native_viewport_app;
14 new native_viewport::NativeViewportOzoneAppDelegate);
15 #else 20 #else
16 mojo::ApplicationRunnerChromium runner( 21 native_viewport::NativeViewportApp native_viewport_app;
17 new native_viewport::NativeViewportAppDelegate);
18 #endif 22 #endif
19 runner.set_message_loop_type(base::MessageLoop::TYPE_UI); 23 mojo::RunApplicationOptionsChromium options(base::MessageLoop::TYPE_UI);
20 return runner.Run(application_request); 24 return mojo::RunApplication(application_request, &native_viewport_app,
25 &options);
21 } 26 }
OLDNEW
« 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