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 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
7 | 7 |
| 8 #include "base/environment.h" |
8 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
9 #include "base/process/launch.h" | |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
11 #include "base/process/process_metrics.h" | 11 #include "base/process/process_metrics.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "content/common/content_export.h" | 14 #include "content/common/content_export.h" |
15 #include "content/public/common/process_type.h" | 15 #include "content/public/common/process_type.h" |
16 #include "ipc/ipc_sender.h" | 16 #include "ipc/ipc_sender.h" |
17 | 17 |
18 class CommandLine; | 18 class CommandLine; |
19 | 19 |
(...skipping 21 matching lines...) Expand all Loading... |
41 | 41 |
42 virtual ~BrowserChildProcessHost() {} | 42 virtual ~BrowserChildProcessHost() {} |
43 | 43 |
44 // Derived classes call this to launch the child process asynchronously. | 44 // Derived classes call this to launch the child process asynchronously. |
45 // Takes ownership of |cmd_line| and |delegate|. | 45 // Takes ownership of |cmd_line| and |delegate|. |
46 virtual void Launch( | 46 virtual void Launch( |
47 #if defined(OS_WIN) | 47 #if defined(OS_WIN) |
48 SandboxedProcessLauncherDelegate* delegate, | 48 SandboxedProcessLauncherDelegate* delegate, |
49 #elif defined(OS_POSIX) | 49 #elif defined(OS_POSIX) |
50 bool use_zygote, | 50 bool use_zygote, |
51 const base::EnvironmentVector& environ, | 51 const base::EnvironmentMap& environ, |
52 #endif | 52 #endif |
53 CommandLine* cmd_line) = 0; | 53 CommandLine* cmd_line) = 0; |
54 | 54 |
55 virtual const ChildProcessData& GetData() const = 0; | 55 virtual const ChildProcessData& GetData() const = 0; |
56 | 56 |
57 // Returns the ChildProcessHost object used by this object. | 57 // Returns the ChildProcessHost object used by this object. |
58 virtual ChildProcessHost* GetHost() const = 0; | 58 virtual ChildProcessHost* GetHost() const = 0; |
59 | 59 |
60 // Returns the termination status of a child. |exit_code| is the | 60 // Returns the termination status of a child. |exit_code| is the |
61 // status returned when the process exited (for posix, as returned | 61 // status returned when the process exited (for posix, as returned |
(...skipping 17 matching lines...) Expand all Loading... |
79 | 79 |
80 #if defined(OS_MACOSX) && !defined(OS_IOS) | 80 #if defined(OS_MACOSX) && !defined(OS_IOS) |
81 // Returns a PortProvider used to get process metrics for child processes. | 81 // Returns a PortProvider used to get process metrics for child processes. |
82 static base::ProcessMetrics::PortProvider* GetPortProvider(); | 82 static base::ProcessMetrics::PortProvider* GetPortProvider(); |
83 #endif | 83 #endif |
84 }; | 84 }; |
85 | 85 |
86 }; // namespace content | 86 }; // namespace content |
87 | 87 |
88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
OLD | NEW |