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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // status returned when the process exited (for posix, as returned | 61 // status returned when the process exited (for posix, as returned |
62 // from waitpid(), for Windows, as returned from | 62 // from waitpid(), for Windows, as returned from |
63 // GetExitCodeProcess()). |exit_code| may be NULL. | 63 // GetExitCodeProcess()). |exit_code| may be NULL. |
64 // |known_dead| indicates that the child is already dead. On Linux, this | 64 // |known_dead| indicates that the child is already dead. On Linux, this |
65 // information is necessary to retrieve accurate information. See | 65 // information is necessary to retrieve accurate information. See |
66 // ChildProcessLauncher::GetChildTerminationStatus() for more details. | 66 // ChildProcessLauncher::GetChildTerminationStatus() for more details. |
67 virtual base::TerminationStatus GetTerminationStatus( | 67 virtual base::TerminationStatus GetTerminationStatus( |
68 bool known_dead, int* exit_code) = 0; | 68 bool known_dead, int* exit_code) = 0; |
69 | 69 |
70 // Sets the user-visible name of the process. | 70 // Sets the user-visible name of the process. |
71 virtual void SetName(const string16& name) = 0; | 71 virtual void SetName(const base::string16& name) = 0; |
72 | 72 |
73 // Set the handle of the process. BrowserChildProcessHost will do this when | 73 // Set the handle of the process. BrowserChildProcessHost will do this when |
74 // the Launch method is used to start the process. However if the owner | 74 // the Launch method is used to start the process. However if the owner |
75 // of this object doesn't call Launch and starts the process in another way, | 75 // of this object doesn't call Launch and starts the process in another way, |
76 // they need to call this method so that the process handle is associated with | 76 // they need to call this method so that the process handle is associated with |
77 // this object. | 77 // this object. |
78 virtual void SetHandle(base::ProcessHandle handle) = 0; | 78 virtual void SetHandle(base::ProcessHandle handle) = 0; |
79 | 79 |
80 #if defined(OS_MACOSX) && !defined(OS_IOS) | 80 #if defined(OS_MACOSX) && !defined(OS_IOS) |
81 // Returns a PortProvider used to get process metrics for child processes. | 81 // Returns a PortProvider used to get process metrics for child processes. |
82 static base::ProcessMetrics::PortProvider* GetPortProvider(); | 82 static base::ProcessMetrics::PortProvider* GetPortProvider(); |
83 #endif | 83 #endif |
84 }; | 84 }; |
85 | 85 |
86 }; // namespace content | 86 }; // namespace content |
87 | 87 |
88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ | 88 #endif // CONTENT_PUBLIC_BROWSER_BROWSER_CHILD_PROCESS_HOST_H_ |
OLD | NEW |