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/environment.h" |
9 #include "base/process/kill.h" | 9 #include "base/process/kill.h" |
10 #include "base/process/process_handle.h" | 10 #include "base/process/process_handle.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 static BrowserChildProcessHost* Create( | 37 static BrowserChildProcessHost* Create( |
38 int process_type, | 38 int process_type, |
39 BrowserChildProcessHostDelegate* delegate); | 39 BrowserChildProcessHostDelegate* delegate); |
40 | 40 |
41 ~BrowserChildProcessHost() override {} | 41 ~BrowserChildProcessHost() override {} |
42 | 42 |
43 // Derived classes call this to launch the child process asynchronously. | 43 // Derived classes call this to launch the child process asynchronously. |
44 // Takes ownership of |cmd_line| and |delegate|. | 44 // Takes ownership of |cmd_line| and |delegate|. |
45 virtual void Launch( | 45 virtual void Launch( |
46 SandboxedProcessLauncherDelegate* delegate, | 46 SandboxedProcessLauncherDelegate* delegate, |
47 base::CommandLine* cmd_line) = 0; | 47 base::CommandLine* cmd_line, |
| 48 bool terminate_on_shutdown) = 0; |
48 | 49 |
49 virtual const ChildProcessData& GetData() const = 0; | 50 virtual const ChildProcessData& GetData() const = 0; |
50 | 51 |
51 // Returns the ChildProcessHost object used by this object. | 52 // Returns the ChildProcessHost object used by this object. |
52 virtual ChildProcessHost* GetHost() const = 0; | 53 virtual ChildProcessHost* GetHost() const = 0; |
53 | 54 |
54 // Returns the termination status of a child. |exit_code| is the | 55 // Returns the termination status of a child. |exit_code| is the |
55 // status returned when the process exited (for posix, as returned | 56 // status returned when the process exited (for posix, as returned |
56 // from waitpid(), for Windows, as returned from | 57 // from waitpid(), for Windows, as returned from |
57 // GetExitCodeProcess()). |exit_code| may be nullptr. | 58 // GetExitCodeProcess()). |exit_code| may be nullptr. |
(...skipping 15 matching lines...) Expand all Loading... |
73 | 74 |
74 #if defined(OS_MACOSX) && !defined(OS_IOS) | 75 #if defined(OS_MACOSX) && !defined(OS_IOS) |
75 // Returns a PortProvider used to get process metrics for child processes. | 76 // Returns a PortProvider used to get process metrics for child processes. |
76 static base::ProcessMetrics::PortProvider* GetPortProvider(); | 77 static base::ProcessMetrics::PortProvider* GetPortProvider(); |
77 #endif | 78 #endif |
78 }; | 79 }; |
79 | 80 |
80 }; // namespace content | 81 }; // namespace content |
81 | 82 |
82 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 83 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
OLD | NEW |