| 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 13 matching lines...) Expand all Loading... |
| 75 | 75 |
| 76 #if defined(OS_MACOSX) && !defined(OS_IOS) | 76 #if defined(OS_MACOSX) && !defined(OS_IOS) |
| 77 // Returns a PortProvider used to get process metrics for child processes. | 77 // Returns a PortProvider used to get process metrics for child processes. |
| 78 static base::ProcessMetrics::PortProvider* GetPortProvider(); | 78 static base::ProcessMetrics::PortProvider* GetPortProvider(); |
| 79 #endif | 79 #endif |
| 80 }; | 80 }; |
| 81 | 81 |
| 82 }; // namespace content | 82 }; // namespace content |
| 83 | 83 |
| 84 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 84 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
| OLD | NEW |