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

Side by Side Diff: mojo/public/cpp/application/lib/application_runner.cc

Issue 814543006: Move //mojo/{public, edk} underneath //third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 11 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "mojo/public/cpp/application/application_runner.h"
6
7 #include "mojo/public/cpp/application/application_delegate.h"
8 #include "mojo/public/cpp/application/application_impl.h"
9 #include "mojo/public/cpp/environment/environment.h"
10 #include "mojo/public/cpp/utility/run_loop.h"
11
12 namespace mojo {
13
14 // static
15 void ApplicationImpl::Terminate() {
16 RunLoop::current()->Quit();
17 }
18
19 ApplicationRunner::ApplicationRunner(ApplicationDelegate* delegate)
20 : delegate_(delegate) {
21 }
22 ApplicationRunner::~ApplicationRunner() {
23 assert(!delegate_);
24 }
25
26 MojoResult ApplicationRunner::Run(MojoHandle shell_handle) {
27 Environment env;
28 {
29 RunLoop loop;
30 ApplicationImpl app(delegate_, shell_handle);
31 loop.Run();
32 }
33
34 delete delegate_;
35 delegate_ = nullptr;
36 return MOJO_RESULT_OK;
37 }
38
39 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/application/lib/application_impl.cc ('k') | mojo/public/cpp/application/lib/application_test_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698