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/child_process_host.h" | 5 #include "shell/child_process_host.h" |
6 | 6 |
7 #include "base/base_switches.h" | 7 #include "base/base_switches.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 LOG_IF(ERROR, !child_process_.WaitForExit(&rv)) | 56 LOG_IF(ERROR, !child_process_.WaitForExit(&rv)) |
57 << "Failed to wait for child process"; | 57 << "Failed to wait for child process"; |
58 child_process_.Close(); | 58 child_process_.Close(); |
59 return rv; | 59 return rv; |
60 } | 60 } |
61 | 61 |
62 void ChildProcessHost::StartApp( | 62 void ChildProcessHost::StartApp( |
63 const String& app_path, | 63 const String& app_path, |
64 bool clean_app_path, | 64 bool clean_app_path, |
65 InterfaceRequest<Application> application_request, | 65 InterfaceRequest<Application> application_request, |
66 const AppChildController::StartAppCallback& on_app_complete) { | 66 const ChildController::StartAppCallback& on_app_complete) { |
67 DCHECK(controller_); | 67 DCHECK(controller_); |
68 | 68 |
69 on_app_complete_ = on_app_complete; | 69 on_app_complete_ = on_app_complete; |
70 controller_->StartApp( | 70 controller_->StartApp( |
71 app_path, clean_app_path, application_request.Pass(), | 71 app_path, clean_app_path, application_request.Pass(), |
72 base::Bind(&ChildProcessHost::AppCompleted, base::Unretained(this))); | 72 base::Bind(&ChildProcessHost::AppCompleted, base::Unretained(this))); |
73 } | 73 } |
74 | 74 |
75 void ChildProcessHost::ExitNow(int32_t exit_code) { | 75 void ChildProcessHost::ExitNow(int32_t exit_code) { |
76 DCHECK(controller_); | 76 DCHECK(controller_); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 on_app_complete.Run(result); | 136 on_app_complete.Run(result); |
137 } | 137 } |
138 } | 138 } |
139 | 139 |
140 void ChildProcessHost::OnConnectionError() { | 140 void ChildProcessHost::OnConnectionError() { |
141 AppCompleted(MOJO_RESULT_UNKNOWN); | 141 AppCompleted(MOJO_RESULT_UNKNOWN); |
142 } | 142 } |
143 | 143 |
144 } // namespace shell | 144 } // namespace shell |
145 } // namespace mojo | 145 } // namespace mojo |
OLD | NEW |