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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 #endif | 299 #endif |
300 | 300 |
301 // Returns true if this process currently has backgrounded priority. | 301 // Returns true if this process currently has backgrounded priority. |
302 virtual bool IsProcessBackgrounded() const = 0; | 302 virtual bool IsProcessBackgrounded() const = 0; |
303 | 303 |
304 // Called when the existence of the other renderer process which is connected | 304 // Called when the existence of the other renderer process which is connected |
305 // to the Worker in this renderer process has changed. | 305 // to the Worker in this renderer process has changed. |
306 virtual void IncrementWorkerRefCount() = 0; | 306 virtual void IncrementWorkerRefCount() = 0; |
307 virtual void DecrementWorkerRefCount() = 0; | 307 virtual void DecrementWorkerRefCount() = 0; |
308 | 308 |
| 309 // Called when the browser context will be destroyed to release the process |
| 310 // which have been kept alive for shared workers. |
| 311 virtual void ForceReleaseWorkerRefCount() = 0; |
| 312 |
309 // Purges and suspends the renderer process. | 313 // Purges and suspends the renderer process. |
310 virtual void PurgeAndSuspend() = 0; | 314 virtual void PurgeAndSuspend() = 0; |
311 | 315 |
312 // Returns the current number of active views in this process. Excludes | 316 // Returns the current number of active views in this process. Excludes |
313 // any RenderViewHosts that are swapped out. | 317 // any RenderViewHosts that are swapped out. |
314 size_t GetActiveViewCount(); | 318 size_t GetActiveViewCount(); |
315 | 319 |
316 // Static management functions ----------------------------------------------- | 320 // Static management functions ----------------------------------------------- |
317 | 321 |
318 // Flag to run the renderer in process. This is primarily | 322 // Flag to run the renderer in process. This is primarily |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 static void SetMaxRendererProcessCount(size_t count); | 368 static void SetMaxRendererProcessCount(size_t count); |
365 | 369 |
366 // Returns the current maximum number of renderer process hosts kept by the | 370 // Returns the current maximum number of renderer process hosts kept by the |
367 // content module. | 371 // content module. |
368 static size_t GetMaxRendererProcessCount(); | 372 static size_t GetMaxRendererProcessCount(); |
369 }; | 373 }; |
370 | 374 |
371 } // namespace content. | 375 } // namespace content. |
372 | 376 |
373 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 377 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
OLD | NEW |