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/application/public/cpp/application_runner.h" | 5 #include "mojo/shell/public/cpp/application_runner.h" |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
11 #include "base/process/launch.h" | 11 #include "base/process/launch.h" |
12 #include "mojo/application/public/cpp/application_delegate.h" | |
13 #include "mojo/application/public/cpp/application_impl.h" | |
14 #include "mojo/message_pump/message_pump_mojo.h" | 12 #include "mojo/message_pump/message_pump_mojo.h" |
| 13 #include "mojo/shell/public/cpp/application_delegate.h" |
| 14 #include "mojo/shell/public/cpp/application_impl.h" |
15 | 15 |
16 namespace mojo { | 16 namespace mojo { |
17 | 17 |
18 int g_application_runner_argc; | 18 int g_application_runner_argc; |
19 const char* const* g_application_runner_argv; | 19 const char* const* g_application_runner_argv; |
20 | 20 |
21 ApplicationRunner::ApplicationRunner(ApplicationDelegate* delegate) | 21 ApplicationRunner::ApplicationRunner(ApplicationDelegate* delegate) |
22 : delegate_(scoped_ptr<ApplicationDelegate>(delegate)), | 22 : delegate_(scoped_ptr<ApplicationDelegate>(delegate)), |
23 message_loop_type_(base::MessageLoop::TYPE_CUSTOM), | 23 message_loop_type_(base::MessageLoop::TYPE_CUSTOM), |
24 has_run_(false) {} | 24 has_run_(false) {} |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 delegate_.reset(); | 68 delegate_.reset(); |
69 } | 69 } |
70 return MOJO_RESULT_OK; | 70 return MOJO_RESULT_OK; |
71 } | 71 } |
72 | 72 |
73 MojoResult ApplicationRunner::Run(MojoHandle application_request_handle) { | 73 MojoResult ApplicationRunner::Run(MojoHandle application_request_handle) { |
74 return Run(application_request_handle, true); | 74 return Run(application_request_handle, true); |
75 } | 75 } |
76 | 76 |
77 } // namespace mojo | 77 } // namespace mojo |
OLD | NEW |