| Index: content/browser/renderer_host/render_process_host_impl.h
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.h b/content/browser/renderer_host/render_process_host_impl.h
|
| index 8d5033e333f299c546c66977edd19e5b2a70dbe3..abf1a0168c3694b30d2694c242a1af223504d973 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.h
|
| +++ b/content/browser/renderer_host/render_process_host_impl.h
|
| @@ -42,6 +42,7 @@
|
| #include "mojo/public/cpp/bindings/associated_binding.h"
|
| #include "mojo/public/cpp/bindings/associated_binding_set.h"
|
| #include "mojo/public/cpp/bindings/interface_ptr.h"
|
| +#include "services/resource_coordinator/public/cpp/resource_coordinator_interface.h"
|
| #include "services/service_manager/public/cpp/binder_registry.h"
|
| #include "services/service_manager/public/interfaces/service.mojom.h"
|
| #include "services/ui/public/interfaces/gpu.mojom.h"
|
| @@ -108,6 +109,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| : public RenderProcessHost,
|
| public ChildProcessLauncher::Client,
|
| public ui::GpuSwitchingObserver,
|
| + public resource_coordinator::mojom::CoordinationPolicyCallback,
|
| public NON_EXPORTED_BASE(mojom::RouteProvider),
|
| public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) {
|
| public:
|
| @@ -185,6 +187,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| void PurgeAndSuspend() override;
|
| void Resume() override;
|
| mojom::Renderer* GetRendererInterface() override;
|
| + resource_coordinator::ResourceCoordinatorInterface*
|
| + GetProcessResourceCoordinator() override;
|
| +
|
| void SetIsNeverSuitableForReuse() override;
|
| bool MayReuseHost() override;
|
|
|
| @@ -206,6 +211,10 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| void OnProcessLaunched() override;
|
| void OnProcessLaunchFailed(int error_code) override;
|
|
|
| + // resource_coordinator::mojom::CoordinationPolicyCallback implementation.
|
| + void SetCoordinationPolicy(
|
| + resource_coordinator::mojom::CoordinationPolicyPtr policy) override;
|
| +
|
| scoped_refptr<AudioRendererHost> audio_renderer_host() const;
|
|
|
| // Call this function when it is evident that the child process is actively
|
| @@ -414,7 +423,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| // Inspects the current object state and sets/removes background priority if
|
| // appropriate. Should be called after any of the involved data members
|
| // change.
|
| - void UpdateProcessPriority();
|
| + void SetProcessPriority(bool should_background);
|
|
|
| // Creates a PersistentMemoryAllocator and shares it with the renderer
|
| // process for it to store histograms from that process. The allocator is
|
| @@ -680,6 +689,11 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| // if a process should be backgrounded.
|
| int audio_stream_count_ = 0;
|
|
|
| + std::unique_ptr<resource_coordinator::ResourceCoordinatorInterface>
|
| + process_resource_coordinator_;
|
| + mojo::Binding<resource_coordinator::mojom::CoordinationPolicyCallback>
|
| + resource_coordinator_binding_;
|
| +
|
| // A WeakPtrFactory which is reset every time Cleanup() runs. Used to vend
|
| // WeakPtrs which are invalidated any time the RPHI is recycled.
|
| std::unique_ptr<base::WeakPtrFactory<RenderProcessHostImpl>>
|
|
|