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_RENDER_PROCESS_HOST_H_ | 5 #ifndef CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 6 #define CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/id_map.h" | 9 #include "base/id_map.h" |
10 #include "base/process/kill.h" | 10 #include "base/process/kill.h" |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 | 172 |
173 // Schedules the host for deletion and removes it from the all_hosts list. | 173 // Schedules the host for deletion and removes it from the all_hosts list. |
174 virtual void Cleanup() = 0; | 174 virtual void Cleanup() = 0; |
175 | 175 |
176 // Track the count of pending views that are being swapped back in. Called | 176 // Track the count of pending views that are being swapped back in. Called |
177 // by listeners to register and unregister pending views to prevent the | 177 // by listeners to register and unregister pending views to prevent the |
178 // process from exiting. | 178 // process from exiting. |
179 virtual void AddPendingView() = 0; | 179 virtual void AddPendingView() = 0; |
180 virtual void RemovePendingView() = 0; | 180 virtual void RemovePendingView() = 0; |
181 | 181 |
182 // Sets a flag indicating that the process can be abnormally terminated. | 182 // Returns true if the process can be immediately terminated. |
183 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; | |
184 // Returns true if the process can be abnormally terminated. | |
185 virtual bool SuddenTerminationAllowed() const = 0; | 183 virtual bool SuddenTerminationAllowed() const = 0; |
186 | 184 |
187 // Returns how long the child has been idle. The definition of idle | 185 // Returns how long the child has been idle. The definition of idle |
188 // depends on when a derived class calls mark_child_process_activity_time(). | 186 // depends on when a derived class calls mark_child_process_activity_time(). |
189 // This is a rough indicator and its resolution should not be better than | 187 // This is a rough indicator and its resolution should not be better than |
190 // 10 milliseconds. | 188 // 10 milliseconds. |
191 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; | 189 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; |
192 | 190 |
193 // Called to resume the requests for a view created through window.open that | 191 // Called to resume the requests for a view created through window.open that |
194 // were initially blocked. | 192 // were initially blocked. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 static void SetMaxRendererProcessCount(size_t count); | 304 static void SetMaxRendererProcessCount(size_t count); |
307 | 305 |
308 // Returns the current maximum number of renderer process hosts kept by the | 306 // Returns the current maximum number of renderer process hosts kept by the |
309 // content module. | 307 // content module. |
310 static size_t GetMaxRendererProcessCount(); | 308 static size_t GetMaxRendererProcessCount(); |
311 }; | 309 }; |
312 | 310 |
313 } // namespace content. | 311 } // namespace content. |
314 | 312 |
315 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 313 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |