| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 | 191 |
| 192 // Schedules the host for deletion and removes it from the all_hosts list. | 192 // Schedules the host for deletion and removes it from the all_hosts list. |
| 193 virtual void Cleanup() = 0; | 193 virtual void Cleanup() = 0; |
| 194 | 194 |
| 195 // Track the count of pending views that are being swapped back in. Called | 195 // Track the count of pending views that are being swapped back in. Called |
| 196 // by listeners to register and unregister pending views to prevent the | 196 // by listeners to register and unregister pending views to prevent the |
| 197 // process from exiting. | 197 // process from exiting. |
| 198 virtual void AddPendingView() = 0; | 198 virtual void AddPendingView() = 0; |
| 199 virtual void RemovePendingView() = 0; | 199 virtual void RemovePendingView() = 0; |
| 200 | 200 |
| 201 // Sets a flag indicating that the process can be abnormally terminated. | 201 // Sets a flag indicating that the process can be abnormally terminated. This |
| 202 // will act like a refcounted system so multiple calls with 'false' will need |
| 203 // the same number of calls with 'true' to enable sudden termination. |
| 202 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; | 204 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; |
| 203 // Returns true if the process can be abnormally terminated. | 205 // Returns true if the process can be abnormally terminated. |
| 204 virtual bool SuddenTerminationAllowed() const = 0; | 206 virtual bool SuddenTerminationAllowed() const = 0; |
| 205 | 207 |
| 206 // Returns how long the child has been idle. The definition of idle | 208 // Returns how long the child has been idle. The definition of idle |
| 207 // depends on when a derived class calls mark_child_process_activity_time(). | 209 // depends on when a derived class calls mark_child_process_activity_time(). |
| 208 // This is a rough indicator and its resolution should not be better than | 210 // This is a rough indicator and its resolution should not be better than |
| 209 // 10 milliseconds. | 211 // 10 milliseconds. |
| 210 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; | 212 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; |
| 211 | 213 |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 static void SetMaxRendererProcessCount(size_t count); | 355 static void SetMaxRendererProcessCount(size_t count); |
| 354 | 356 |
| 355 // Returns the current maximum number of renderer process hosts kept by the | 357 // Returns the current maximum number of renderer process hosts kept by the |
| 356 // content module. | 358 // content module. |
| 357 static size_t GetMaxRendererProcessCount(); | 359 static size_t GetMaxRendererProcessCount(); |
| 358 }; | 360 }; |
| 359 | 361 |
| 360 } // namespace content. | 362 } // namespace content. |
| 361 | 363 |
| 362 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 364 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |