| 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/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // will get terminated at browser shutdown. | 40 // will get terminated at browser shutdown. |
| 41 class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { | 41 class CONTENT_EXPORT BrowserChildProcessHost : public IPC::Sender { |
| 42 public: | 42 public: |
| 43 // Used to create a child process host. The delegate must outlive this object. | 43 // Used to create a child process host. The delegate must outlive this object. |
| 44 // |process_type| needs to be either an enum value from ProcessType or an | 44 // |process_type| needs to be either an enum value from ProcessType or an |
| 45 // embedder-defined value. | 45 // embedder-defined value. |
| 46 static BrowserChildProcessHost* Create( | 46 static BrowserChildProcessHost* Create( |
| 47 content::ProcessType process_type, | 47 content::ProcessType process_type, |
| 48 BrowserChildProcessHostDelegate* delegate); | 48 BrowserChildProcessHostDelegate* delegate); |
| 49 | 49 |
| 50 // Used to create a child process host, connecting the process to the shell | 50 // Used to create a child process host, connecting the process to the |
| 51 // as a new service instance identified by |service_name| and (optional) | 51 // Service Manager as a new service instance identified by |service_name| and |
| 52 // |instance_id|. | 52 // (optional) |instance_id|. |
| 53 static BrowserChildProcessHost* Create( | 53 static BrowserChildProcessHost* Create( |
| 54 content::ProcessType process_type, | 54 content::ProcessType process_type, |
| 55 BrowserChildProcessHostDelegate* delegate, | 55 BrowserChildProcessHostDelegate* delegate, |
| 56 const std::string& service_name); | 56 const std::string& service_name); |
| 57 | 57 |
| 58 // Returns the child process host with unique id |child_process_id|, or | 58 // Returns the child process host with unique id |child_process_id|, or |
| 59 // nullptr if it doesn't exist. |child_process_id| is NOT the process ID, but | 59 // nullptr if it doesn't exist. |child_process_id| is NOT the process ID, but |
| 60 // is the same unique ID as |ChildProcessData::id|. | 60 // is the same unique ID as |ChildProcessData::id|. |
| 61 static BrowserChildProcessHost* FromID(int child_process_id); | 61 static BrowserChildProcessHost* FromID(int child_process_id); |
| 62 | 62 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 | 102 |
| 103 #if defined(OS_MACOSX) | 103 #if defined(OS_MACOSX) |
| 104 // Returns a PortProvider used to get the task port for child processes. | 104 // Returns a PortProvider used to get the task port for child processes. |
| 105 static base::PortProvider* GetPortProvider(); | 105 static base::PortProvider* GetPortProvider(); |
| 106 #endif | 106 #endif |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 }; // namespace content | 109 }; // namespace content |
| 110 | 110 |
| 111 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 111 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
| OLD | NEW |