OLD | NEW |
---|---|
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/public/cpp/application/application_runner.h" | 5 #include "mojo/public/cpp/application/application_runner.h" |
6 | 6 |
7 #include "mojo/public/cpp/application/application_delegate.h" | 7 #include "mojo/public/cpp/application/application_delegate.h" |
8 #include "mojo/public/cpp/application/application_impl.h" | 8 #include "mojo/public/cpp/application/application_impl.h" |
9 #include "mojo/public/cpp/application/application_impl_base.h" | |
9 #include "mojo/public/cpp/environment/environment.h" | 10 #include "mojo/public/cpp/environment/environment.h" |
10 #include "mojo/public/cpp/environment/logging.h" | 11 #include "mojo/public/cpp/environment/logging.h" |
11 #include "mojo/public/cpp/utility/run_loop.h" | 12 #include "mojo/public/cpp/utility/run_loop.h" |
12 | 13 |
13 namespace mojo { | 14 namespace mojo { |
14 namespace { | 15 namespace { |
15 bool g_running = false; | 16 bool g_running = false; |
16 } // namespace | 17 } // namespace |
17 | 18 |
18 // static | 19 // static |
19 void ApplicationImpl::Terminate() { | 20 void ApplicationImplBase::Terminate() { |
vardhan
2016/05/17 23:36:52
feels weird that this is defined here. is there a
viettrungluu
2016/05/17 23:42:50
Yeah, but it'll require a bunch of work.
| |
20 RunLoop::current()->Quit(); | 21 RunLoop::current()->Quit(); |
21 } | 22 } |
22 | 23 |
23 ApplicationRunner::ApplicationRunner( | 24 ApplicationRunner::ApplicationRunner( |
24 std::unique_ptr<ApplicationDelegate> delegate) | 25 std::unique_ptr<ApplicationDelegate> delegate) |
25 : delegate_(std::move(delegate)) {} | 26 : delegate_(std::move(delegate)) {} |
26 | 27 |
27 ApplicationRunner::~ApplicationRunner() { | 28 ApplicationRunner::~ApplicationRunner() { |
28 assert(!delegate_); | 29 assert(!delegate_); |
29 } | 30 } |
(...skipping 25 matching lines...) Expand all Loading... | |
55 } | 56 } |
56 | 57 |
57 delegate_.reset(); | 58 delegate_.reset(); |
58 | 59 |
59 g_running = false; | 60 g_running = false; |
60 | 61 |
61 return MOJO_RESULT_OK; | 62 return MOJO_RESULT_OK; |
62 } | 63 } |
63 | 64 |
64 } // namespace mojo | 65 } // namespace mojo |
OLD | NEW |