OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/child_process_launcher.h" | 5 #include "content/browser/child_process_launcher.h" |
6 | 6 |
7 #include <utility> // For std::pair. | 7 #include <utility> // For std::pair. |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "base/file_path.h" | 24 #include "base/file_path.h" |
25 #include "content/common/sandbox_policy.h" | 25 #include "content/common/sandbox_policy.h" |
26 #elif defined(OS_MACOSX) | 26 #elif defined(OS_MACOSX) |
27 #include "content/browser/mach_broker_mac.h" | 27 #include "content/browser/mach_broker_mac.h" |
28 #elif defined(OS_ANDROID) | 28 #elif defined(OS_ANDROID) |
29 #include "base/android/jni_android.h" | 29 #include "base/android/jni_android.h" |
30 #include "content/browser/android/sandboxed_process_launcher.h" | 30 #include "content/browser/android/sandboxed_process_launcher.h" |
31 #elif defined(OS_POSIX) | 31 #elif defined(OS_POSIX) |
32 #include "base/memory/singleton.h" | 32 #include "base/memory/singleton.h" |
33 #include "content/browser/renderer_host/render_sandbox_host_linux.h" | 33 #include "content/browser/renderer_host/render_sandbox_host_linux.h" |
34 #include "content/browser/zygote_host_impl_linux.h" | 34 #include "content/browser/zygote_host/zygote_host_impl_linux.h" |
35 #endif | 35 #endif |
36 | 36 |
37 #if defined(OS_POSIX) | 37 #if defined(OS_POSIX) |
38 #include "base/global_descriptors_posix.h" | 38 #include "base/global_descriptors_posix.h" |
39 #endif | 39 #endif |
40 | 40 |
41 using content::BrowserThread; | 41 using content::BrowserThread; |
42 | 42 |
43 // Having the functionality of ChildProcessLauncher be in an internal | 43 // Having the functionality of ChildProcessLauncher be in an internal |
44 // ref counted object allows us to automatically terminate the process when the | 44 // ref counted object allows us to automatically terminate the process when the |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 base::Bind( | 445 base::Bind( |
446 &ChildProcessLauncher::Context::SetProcessBackgrounded, | 446 &ChildProcessLauncher::Context::SetProcessBackgrounded, |
447 GetHandle(), background)); | 447 GetHandle(), background)); |
448 } | 448 } |
449 | 449 |
450 void ChildProcessLauncher::SetTerminateChildOnShutdown( | 450 void ChildProcessLauncher::SetTerminateChildOnShutdown( |
451 bool terminate_on_shutdown) { | 451 bool terminate_on_shutdown) { |
452 if (context_) | 452 if (context_) |
453 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); | 453 context_->set_terminate_child_on_shutdown(terminate_on_shutdown); |
454 } | 454 } |
OLD | NEW |