| 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 <list> | 8 #include <list> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 // Schedules the host for deletion and removes it from the all_hosts list. | 179 // Schedules the host for deletion and removes it from the all_hosts list. |
| 180 virtual void Cleanup() = 0; | 180 virtual void Cleanup() = 0; |
| 181 | 181 |
| 182 // Track the count of pending views that are being swapped back in. Called | 182 // Track the count of pending views that are being swapped back in. Called |
| 183 // by listeners to register and unregister pending views to prevent the | 183 // by listeners to register and unregister pending views to prevent the |
| 184 // process from exiting. | 184 // process from exiting. |
| 185 virtual void AddPendingView() = 0; | 185 virtual void AddPendingView() = 0; |
| 186 virtual void RemovePendingView() = 0; | 186 virtual void RemovePendingView() = 0; |
| 187 | 187 |
| 188 // Sets a flag indicating that the process can be abnormally terminated. | 188 // Returns true if the process can be immediately terminated. |
| 189 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; | |
| 190 // Returns true if the process can be abnormally terminated. | |
| 191 virtual bool SuddenTerminationAllowed() const = 0; | 189 virtual bool SuddenTerminationAllowed() const = 0; |
| 192 | 190 |
| 193 // Returns how long the child has been idle. The definition of idle | 191 // Returns how long the child has been idle. The definition of idle |
| 194 // depends on when a derived class calls mark_child_process_activity_time(). | 192 // depends on when a derived class calls mark_child_process_activity_time(). |
| 195 // This is a rough indicator and its resolution should not be better than | 193 // This is a rough indicator and its resolution should not be better than |
| 196 // 10 milliseconds. | 194 // 10 milliseconds. |
| 197 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; | 195 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; |
| 198 | 196 |
| 199 // Called to resume the requests for a view created through window.open that | 197 // Called to resume the requests for a view created through window.open that |
| 200 // were initially blocked. | 198 // were initially blocked. |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 static void SetMaxRendererProcessCount(size_t count); | 320 static void SetMaxRendererProcessCount(size_t count); |
| 323 | 321 |
| 324 // Returns the current maximum number of renderer process hosts kept by the | 322 // Returns the current maximum number of renderer process hosts kept by the |
| 325 // content module. | 323 // content module. |
| 326 static size_t GetMaxRendererProcessCount(); | 324 static size_t GetMaxRendererProcessCount(); |
| 327 }; | 325 }; |
| 328 | 326 |
| 329 } // namespace content. | 327 } // namespace content. |
| 330 | 328 |
| 331 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 329 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |