| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 | 357 |
| 358 // Acquires the interface to the Global Resource Coordinator for this process. | 358 // Acquires the interface to the Global Resource Coordinator for this process. |
| 359 virtual resource_coordinator::ResourceCoordinatorInterface* | 359 virtual resource_coordinator::ResourceCoordinatorInterface* |
| 360 GetProcessResourceCoordinator() = 0; | 360 GetProcessResourceCoordinator() = 0; |
| 361 | 361 |
| 362 // Whether this process is locked out from ever being reused for sites other | 362 // Whether this process is locked out from ever being reused for sites other |
| 363 // than the ones it currently has. | 363 // than the ones it currently has. |
| 364 virtual void SetIsNeverSuitableForReuse() = 0; | 364 virtual void SetIsNeverSuitableForReuse() = 0; |
| 365 virtual bool MayReuseHost() = 0; | 365 virtual bool MayReuseHost() = 0; |
| 366 | 366 |
| 367 // Indicates whether this RenderProcessHost is "unused". This starts out as |
| 368 // true for new processes and becomes false after one of the following: |
| 369 // (1) This process commits any page. |
| 370 // (2) This process is given to a SiteInstance that already has a site |
| 371 // assigned. |
| 372 // Note that while a process is unused, it is still suitable to host a URL |
| 373 // that requires a dedicated process. |
| 374 virtual bool IsUnused() = 0; |
| 375 virtual void SetIsUsed() = 0; |
| 376 |
| 367 // Returns the current number of active views in this process. Excludes | 377 // Returns the current number of active views in this process. Excludes |
| 368 // any RenderViewHosts that are swapped out. | 378 // any RenderViewHosts that are swapped out. |
| 369 size_t GetActiveViewCount(); | 379 size_t GetActiveViewCount(); |
| 370 | 380 |
| 371 // Posts |task|, if this RenderProcessHost is ready or when it becomes ready | 381 // Posts |task|, if this RenderProcessHost is ready or when it becomes ready |
| 372 // (see RenderProcessHost::IsReady method). The |task| might not run at all | 382 // (see RenderProcessHost::IsReady method). The |task| might not run at all |
| 373 // (e.g. if |render_process_host| is destroyed before becoming ready). This | 383 // (e.g. if |render_process_host| is destroyed before becoming ready). This |
| 374 // function can only be called on the browser's UI thread (and the |task| will | 384 // function can only be called on the browser's UI thread (and the |task| will |
| 375 // be posted back on the UI thread). | 385 // be posted back on the UI thread). |
| 376 void PostTaskWhenProcessIsReady(base::OnceClosure task); | 386 void PostTaskWhenProcessIsReady(base::OnceClosure task); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 static void SetMaxRendererProcessCount(size_t count); | 436 static void SetMaxRendererProcessCount(size_t count); |
| 427 | 437 |
| 428 // Returns the current maximum number of renderer process hosts kept by the | 438 // Returns the current maximum number of renderer process hosts kept by the |
| 429 // content module. | 439 // content module. |
| 430 static size_t GetMaxRendererProcessCount(); | 440 static size_t GetMaxRendererProcessCount(); |
| 431 }; | 441 }; |
| 432 | 442 |
| 433 } // namespace content. | 443 } // namespace content. |
| 434 | 444 |
| 435 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ | 445 #endif // CONTENT_PUBLIC_BROWSER_RENDER_PROCESS_HOST_H_ |
| OLD | NEW |