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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 | 182 |
183 // Schedules the host for deletion and removes it from the all_hosts list. | 183 // Schedules the host for deletion and removes it from the all_hosts list. |
184 virtual void Cleanup() = 0; | 184 virtual void Cleanup() = 0; |
185 | 185 |
186 // Track the count of pending views that are being swapped back in. Called | 186 // Track the count of pending views that are being swapped back in. Called |
187 // by listeners to register and unregister pending views to prevent the | 187 // by listeners to register and unregister pending views to prevent the |
188 // process from exiting. | 188 // process from exiting. |
189 virtual void AddPendingView() = 0; | 189 virtual void AddPendingView() = 0; |
190 virtual void RemovePendingView() = 0; | 190 virtual void RemovePendingView() = 0; |
191 | 191 |
192 // Returns true if the process can be immediately terminated. | 192 // Sets a flag indicating that the process can be abnormally terminated. |
| 193 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; |
| 194 // Returns true if the process can be abnormally terminated. |
193 virtual bool SuddenTerminationAllowed() const = 0; | 195 virtual bool SuddenTerminationAllowed() const = 0; |
194 | 196 |
195 // Returns how long the child has been idle. The definition of idle | 197 // Returns how long the child has been idle. The definition of idle |
196 // depends on when a derived class calls mark_child_process_activity_time(). | 198 // depends on when a derived class calls mark_child_process_activity_time(). |
197 // This is a rough indicator and its resolution should not be better than | 199 // This is a rough indicator and its resolution should not be better than |
198 // 10 milliseconds. | 200 // 10 milliseconds. |
199 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; | 201 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; |
200 | 202 |
201 // Called to resume the requests for a view created through window.open that | 203 // Called to resume the requests for a view created through window.open that |
202 // were initially blocked. | 204 // were initially blocked. |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 static void SetMaxRendererProcessCount(size_t count); | 337 static void SetMaxRendererProcessCount(size_t count); |
336 | 338 |
337 // Returns the current maximum number of renderer process hosts kept by the | 339 // Returns the current maximum number of renderer process hosts kept by the |
338 // content module. | 340 // content module. |
339 static size_t GetMaxRendererProcessCount(); | 341 static size_t GetMaxRendererProcessCount(); |
340 }; | 342 }; |
341 | 343 |
342 } // namespace content. | 344 } // namespace content. |
343 | 345 |
344 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 346 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |