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/process_util.h" | 8 #include "base/process_util.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 15 matching lines...) Expand all Loading... |
26 class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { | 26 class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { |
27 public: | 27 public: |
28 // Used to create a child process host. The delegate must outlive this object. | 28 // Used to create a child process host. The delegate must outlive this object. |
29 static BrowserChildProcessHost* Create( | 29 static BrowserChildProcessHost* Create( |
30 ProcessType type, | 30 ProcessType type, |
31 BrowserChildProcessHostDelegate* delegate); | 31 BrowserChildProcessHostDelegate* delegate); |
32 | 32 |
33 virtual ~BrowserChildProcessHost() {} | 33 virtual ~BrowserChildProcessHost() {} |
34 | 34 |
35 // Derived classes call this to launch the child process asynchronously. | 35 // Derived classes call this to launch the child process asynchronously. |
| 36 // Takes ownership of |cmd_line|. |
36 virtual void Launch( | 37 virtual void Launch( |
37 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
38 const FilePath& exposed_dir, | 39 const FilePath& exposed_dir, |
39 #elif defined(OS_POSIX) | 40 #elif defined(OS_POSIX) |
40 bool use_zygote, | 41 bool use_zygote, |
41 const base::EnvironmentVector& environ, | 42 const base::EnvironmentVector& environ, |
42 #endif | 43 #endif |
43 CommandLine* cmd_line) = 0; | 44 CommandLine* cmd_line) = 0; |
44 | 45 |
45 virtual const ChildProcessData& GetData() const = 0; | 46 virtual const ChildProcessData& GetData() const = 0; |
(...skipping 19 matching lines...) Expand all Loading... |
65 | 66 |
66 #if defined(OS_MACOSX) | 67 #if defined(OS_MACOSX) |
67 // Returns a PortProvider used to get process metrics for child processes. | 68 // Returns a PortProvider used to get process metrics for child processes. |
68 static base::ProcessMetrics::PortProvider* GetPortProvider(); | 69 static base::ProcessMetrics::PortProvider* GetPortProvider(); |
69 #endif | 70 #endif |
70 }; | 71 }; |
71 | 72 |
72 }; // namespace content | 73 }; // namespace content |
73 | 74 |
74 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 75 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
OLD | NEW |