| 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 1eac862663f1a142b3979b4f6218164cfb248d42..838e43d6030c9c3123260a33d6d91798d628706d 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.h
|
| +++ b/content/browser/renderer_host/render_process_host_impl.h
|
| @@ -37,6 +37,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/interface_registry.h"
|
| #include "services/service_manager/public/interfaces/service.mojom.h"
|
| #include "services/ui/public/interfaces/gpu.mojom.h"
|
| @@ -104,6 +105,7 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| : public RenderProcessHost,
|
| public ChildProcessLauncher::Client,
|
| public ui::GpuSwitchingObserver,
|
| + public resource_coordinator::mojom::PolicyCallback,
|
| public NON_EXPORTED_BASE(mojom::RouteProvider),
|
| public NON_EXPORTED_BASE(mojom::AssociatedInterfaceProvider) {
|
| public:
|
| @@ -197,6 +199,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| void OnProcessLaunched() override;
|
| void OnProcessLaunchFailed(int error_code) override;
|
|
|
| + // resource_coordinator::mojom::PolicyCallback implementation.
|
| + void SetPolicy(resource_coordinator::mojom::PolicyPtr policy) override;
|
| +
|
| scoped_refptr<AudioRendererHost> audio_renderer_host() const;
|
|
|
| // Call this function when it is evident that the child process is actively
|
| @@ -289,6 +294,9 @@ class CONTENT_EXPORT RenderProcessHostImpl
|
| void OnAudioStreamRemoved() override;
|
| int get_audio_stream_count_for_testing() const { return audio_stream_count_; }
|
|
|
| + resource_coordinator::ResourceCoordinatorInterface*
|
| + GetProcessResourceCoordinator();
|
| +
|
| protected:
|
| // A proxy for our IPC::Channel that lives on the IO thread.
|
| std::unique_ptr<IPC::ChannelProxy> channel_;
|
| @@ -365,7 +373,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
|
| @@ -604,6 +612,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::PolicyCallback>
|
| + 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>>
|
|
|