| 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/shell/runner/host/child_process_host.h" | 5 #include "services/shell/runner/host/child_process_host.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| 11 #include "base/bind.h" | 11 #include "base/bind.h" |
| 12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
| 13 #include "base/location.h" | 13 #include "base/location.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/message_loop/message_loop.h" | 16 #include "base/message_loop/message_loop.h" |
| 17 #include "base/process/kill.h" | 17 #include "base/process/kill.h" |
| 18 #include "base/process/launch.h" | 18 #include "base/process/launch.h" |
| 19 #include "base/synchronization/lock.h" | 19 #include "base/synchronization/lock.h" |
| 20 #include "base/task_runner.h" | 20 #include "base/task_runner.h" |
| 21 #include "base/thread_task_runner_handle.h" | 21 #include "base/thread_task_runner_handle.h" |
| 22 #include "mojo/edk/embedder/embedder.h" | 22 #include "mojo/edk/embedder/embedder.h" |
| 23 #include "mojo/public/cpp/bindings/interface_ptr_info.h" | 23 #include "mojo/public/cpp/bindings/interface_ptr_info.h" |
| 24 #include "mojo/public/cpp/system/core.h" | 24 #include "mojo/public/cpp/system/core.h" |
| 25 #include "mojo/shell/native_runner_delegate.h" | 25 #include "services/shell/native_runner_delegate.h" |
| 26 #include "mojo/shell/runner/common/client_util.h" | 26 #include "services/shell/runner/common/client_util.h" |
| 27 #include "mojo/shell/runner/common/switches.h" | 27 #include "services/shell/runner/common/switches.h" |
| 28 | 28 |
| 29 #if defined(OS_LINUX) && !defined(OS_ANDROID) | 29 #if defined(OS_LINUX) && !defined(OS_ANDROID) |
| 30 #include "sandbox/linux/services/namespace_sandbox.h" | 30 #include "sandbox/linux/services/namespace_sandbox.h" |
| 31 #endif | 31 #endif |
| 32 | 32 |
| 33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 34 #include "base/win/windows_version.h" | 34 #include "base/win/windows_version.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 #if defined(OS_MACOSX) | 37 #if defined(OS_MACOSX) |
| 38 #include "mojo/shell/runner/host/mach_broker.h" | 38 #include "services/shell/runner/host/mach_broker.h" |
| 39 #endif | 39 #endif |
| 40 | 40 |
| 41 namespace mojo { | 41 namespace mojo { |
| 42 namespace shell { | 42 namespace shell { |
| 43 | 43 |
| 44 ChildProcessHost::ChildProcessHost(base::TaskRunner* launch_process_runner, | 44 ChildProcessHost::ChildProcessHost(base::TaskRunner* launch_process_runner, |
| 45 NativeRunnerDelegate* delegate, | 45 NativeRunnerDelegate* delegate, |
| 46 bool start_sandboxed, | 46 bool start_sandboxed, |
| 47 const Identity& target, | 47 const Identity& target, |
| 48 const base::FilePath& app_path) | 48 const base::FilePath& app_path) |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 child_process_.Handle(), | 203 child_process_.Handle(), |
| 204 mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle( | 204 mojo::edk::ScopedPlatformHandle(mojo::edk::PlatformHandle( |
| 205 mojo_ipc_channel_->PassServerHandle().release().handle))); | 205 mojo_ipc_channel_->PassServerHandle().release().handle))); |
| 206 } | 206 } |
| 207 } | 207 } |
| 208 start_child_process_event_.Signal(); | 208 start_child_process_event_.Signal(); |
| 209 } | 209 } |
| 210 | 210 |
| 211 } // namespace shell | 211 } // namespace shell |
| 212 } // namespace mojo | 212 } // namespace mojo |
| OLD | NEW |