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 // Called when the sudden termination status of a frame has changed. |
183 virtual void SetSuddenTerminationAllowed(bool allowed) = 0; | 183 virtual void SuddenTerminationChangedForFrame(bool allowed) = 0; |
Charlie Reis
2015/01/23 06:01:32
This doesn't belong in the public API (nor did Set
clamy
2015/01/26 16:38:40
The problem with not having these functions in the
| |
184 // Returns true if the process can be abnormally terminated. | 184 // Returns true if the process can be abnormally terminated. |
Charlie Reis
2015/01/23 06:01:32
abnormally terminated -> immediately terminated
clamy
2015/01/26 16:38:40
Done.
| |
185 virtual bool SuddenTerminationAllowed() const = 0; | 185 virtual bool SuddenTerminationAllowed() const = 0; |
186 | 186 |
187 // Returns how long the child has been idle. The definition of idle | 187 // 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(). | 188 // 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 | 189 // This is a rough indicator and its resolution should not be better than |
190 // 10 milliseconds. | 190 // 10 milliseconds. |
191 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; | 191 virtual base::TimeDelta GetChildProcessIdleTime() const = 0; |
192 | 192 |
193 // Called to resume the requests for a view created through window.open that | 193 // Called to resume the requests for a view created through window.open that |
194 // were initially blocked. | 194 // were initially blocked. |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
306 static void SetMaxRendererProcessCount(size_t count); | 306 static void SetMaxRendererProcessCount(size_t count); |
307 | 307 |
308 // Returns the current maximum number of renderer process hosts kept by the | 308 // Returns the current maximum number of renderer process hosts kept by the |
309 // content module. | 309 // content module. |
310 static size_t GetMaxRendererProcessCount(); | 310 static size_t GetMaxRendererProcessCount(); |
311 }; | 311 }; |
312 | 312 |
313 } // namespace content. | 313 } // namespace content. |
314 | 314 |
315 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 315 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |