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 17 matching lines...) Expand all Loading... |
28 struct ChildProcessData; | 28 struct ChildProcessData; |
29 | 29 |
30 // This represents child processes of the browser process, i.e. plugins. They | 30 // This represents child processes of the browser process, i.e. plugins. They |
31 // will get terminated at browser shutdown. | 31 // will get terminated at browser shutdown. |
32 class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { | 32 class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { |
33 public: | 33 public: |
34 // Used to create a child process host. The delegate must outlive this object. | 34 // Used to create a child process host. The delegate must outlive this object. |
35 // |process_type| needs to be either an enum value from ProcessType or an | 35 // |process_type| needs to be either an enum value from ProcessType or an |
36 // embedder-defined value. | 36 // embedder-defined value. |
37 static BrowserChildProcessHost* Create( | 37 static BrowserChildProcessHost* Create( |
38 int process_type, | 38 content::ProcessType 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, | 47 base::CommandLine* cmd_line, |
48 bool terminate_on_shutdown) = 0; | 48 bool terminate_on_shutdown) = 0; |
(...skipping 25 matching lines...) Expand all Loading... |
74 | 74 |
75 #if defined(OS_MACOSX) && !defined(OS_IOS) | 75 #if defined(OS_MACOSX) && !defined(OS_IOS) |
76 // Returns a PortProvider used to get process metrics for child processes. | 76 // Returns a PortProvider used to get process metrics for child processes. |
77 static base::ProcessMetrics::PortProvider* GetPortProvider(); | 77 static base::ProcessMetrics::PortProvider* GetPortProvider(); |
78 #endif | 78 #endif |
79 }; | 79 }; |
80 | 80 |
81 }; // namespace content | 81 }; // namespace content |
82 | 82 |
83 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 83 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
OLD | NEW |