Index: mojo/shell/runner/host/out_of_process_native_runner.cc |
diff --git a/mojo/shell/runner/host/out_of_process_native_runner.cc b/mojo/shell/runner/host/out_of_process_native_runner.cc |
index 4b020c6d37a0889d19ff413b4f8013eb9fc00594..4c0c8bfd2ff9bf5dec31a7e5d63c7c13d0bb746d 100644 |
--- a/mojo/shell/runner/host/out_of_process_native_runner.cc |
+++ b/mojo/shell/runner/host/out_of_process_native_runner.cc |
@@ -41,12 +41,9 @@ void OutOfProcessNativeRunner::Start( |
child_process_host_.reset( |
new ChildProcessHost(launch_process_runner_, start_sandboxed, app_path)); |
- child_process_host_->Start(pid_available_callback); |
- |
- child_process_host_->StartApp( |
- std::move(application_request), |
- base::Bind(&OutOfProcessNativeRunner::AppCompleted, |
- base::Unretained(this))); |
+ child_process_host_->Start(base::Bind( |
+ &OutOfProcessNativeRunner::OnProcessLaunched, base::Unretained(this), |
+ base::Passed(&application_request), pid_available_callback)); |
} |
void OutOfProcessNativeRunner::InitHost( |
@@ -71,7 +68,19 @@ void OutOfProcessNativeRunner::AppCompleted(int32_t result) { |
app_completed_callback.Run(); |
} |
-scoped_ptr<NativeRunner> OutOfProcessNativeRunnerFactory::Create( |
+void OutOfProcessNativeRunner::OnProcessLaunched( |
+ InterfaceRequest<Application> application_request, |
+ const base::Callback<void(base::ProcessId)>& pid_available_callback, |
+ base::ProcessId pid) { |
+ DCHECK(child_process_host_); |
+ child_process_host_->StartApp( |
+ std::move(application_request), |
+ base::Bind(&OutOfProcessNativeRunner::AppCompleted, |
+ base::Unretained(this))); |
+ pid_available_callback.Run(pid); |
+} |
+ |
+scoped_ptr<shell::NativeRunner> OutOfProcessNativeRunnerFactory::Create( |
const base::FilePath& app_path) { |
return make_scoped_ptr(new OutOfProcessNativeRunner(launch_process_runner_)); |
} |