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 "shell/app_child_process_host.h" | 5 #include "shell/app_child_process_host.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
10 #include "mojo/edk/embedder/embedder.h" | 10 #include "mojo/edk/embedder/embedder.h" |
11 #include "mojo/public/cpp/system/core.h" | 11 #include "mojo/public/cpp/system/core.h" |
12 #include "shell/context.h" | 12 #include "shell/context.h" |
13 #include "shell/task_runners.h" | 13 #include "shell/task_runners.h" |
14 | 14 |
15 namespace mojo { | 15 namespace mojo { |
16 namespace shell { | 16 namespace shell { |
17 | 17 |
18 AppChildProcessHost::AppChildProcessHost(Context* context) | 18 AppChildProcessHost::AppChildProcessHost(Context* context) |
19 : ChildProcessHost(context, this), channel_info_(nullptr) { | 19 : ChildProcessHost(context), channel_info_(nullptr) { |
20 } | 20 } |
21 | 21 |
22 AppChildProcessHost::~AppChildProcessHost() { | 22 AppChildProcessHost::~AppChildProcessHost() { |
23 } | 23 } |
24 | 24 |
25 void AppChildProcessHost::StartApp( | 25 void AppChildProcessHost::StartApp( |
26 const String& app_path, | 26 const String& app_path, |
27 bool clean_app_path, | 27 bool clean_app_path, |
28 InterfaceRequest<Application> application_request, | 28 InterfaceRequest<Application> application_request, |
29 const AppChildController::StartAppCallback& on_app_complete) { | 29 const AppChildController::StartAppCallback& on_app_complete) { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 void AppChildProcessHost::AppCompleted(int32_t result) { | 75 void AppChildProcessHost::AppCompleted(int32_t result) { |
76 if (!on_app_complete_.is_null()) { | 76 if (!on_app_complete_.is_null()) { |
77 auto on_app_complete = on_app_complete_; | 77 auto on_app_complete = on_app_complete_; |
78 on_app_complete_.reset(); | 78 on_app_complete_.reset(); |
79 on_app_complete.Run(result); | 79 on_app_complete.Run(result); |
80 } | 80 } |
81 } | 81 } |
82 | 82 |
83 } // namespace shell | 83 } // namespace shell |
84 } // namespace mojo | 84 } // namespace mojo |
OLD | NEW |