Chromium Code Reviews| 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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 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 IncrementServiceWorkerRefCount() = 0; | 306 virtual void IncrementServiceWorkerRefCount() = 0; |
| 307 virtual void DecrementServiceWorkerRefCount() = 0; | 307 virtual void DecrementServiceWorkerRefCount() = 0; |
| 308 virtual void IncrementSharedWorkerRefCount() = 0; | 308 virtual void IncrementSharedWorkerRefCount() = 0; |
| 309 virtual void DecrementSharedWorkerRefCount() = 0; | 309 virtual void DecrementSharedWorkerRefCount() = 0; |
| 310 | 310 |
| 311 // Sets worker ref counts to zero. Called when the browser context will be | |
| 312 // destroyed so this RenderProcessHost can immediately die. | |
| 313 // | |
| 314 // After this is called, the Increment/DecrementWorkerRefCount functions must | |
| 315 // not be called. | |
| 316 virtual void ForceReleaseWorkerRefCounts() = 0; | |
|
jam
2016/09/14 17:10:49
can you put these two methods on just RenderProces
falken
2016/09/21 08:59:43
I can't because the AllHostsIterator can include M
jam
2016/09/23 19:14:28
Is that code run during unittests though? i.e. we
| |
| 317 | |
| 318 // Returns true if ForceReleaseWorkerRefCounts was called. | |
| 319 virtual bool IsWorkerRefCountDisabled() = 0; | |
| 320 | |
| 311 // Purges and suspends the renderer process. | 321 // Purges and suspends the renderer process. |
| 312 virtual void PurgeAndSuspend() = 0; | 322 virtual void PurgeAndSuspend() = 0; |
| 313 | 323 |
| 314 // Returns the current number of active views in this process. Excludes | 324 // Returns the current number of active views in this process. Excludes |
| 315 // any RenderViewHosts that are swapped out. | 325 // any RenderViewHosts that are swapped out. |
| 316 size_t GetActiveViewCount(); | 326 size_t GetActiveViewCount(); |
| 317 | 327 |
| 318 // Static management functions ----------------------------------------------- | 328 // Static management functions ----------------------------------------------- |
| 319 | 329 |
| 320 // Flag to run the renderer in process. This is primarily | 330 // Flag to run the renderer in process. This is primarily |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 366 static void SetMaxRendererProcessCount(size_t count); | 376 static void SetMaxRendererProcessCount(size_t count); |
| 367 | 377 |
| 368 // Returns the current maximum number of renderer process hosts kept by the | 378 // Returns the current maximum number of renderer process hosts kept by the |
| 369 // content module. | 379 // content module. |
| 370 static size_t GetMaxRendererProcessCount(); | 380 static size_t GetMaxRendererProcessCount(); |
| 371 }; | 381 }; |
| 372 | 382 |
| 373 } // namespace content. | 383 } // namespace content. |
| 374 | 384 |
| 375 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 385 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |