| Index: content/browser/renderer_host/render_process_host_impl.cc
|
| diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
| index 67c5e5d64a18b8230867611b904860f3603a688c..d0399aa9d410fb8d0d1b20a67449f833cfb49e9d 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -186,6 +186,7 @@
|
| #include "mojo/public/cpp/bindings/strong_binding.h"
|
| #include "net/url_request/url_request_context_getter.h"
|
| #include "ppapi/features/features.h"
|
| +#include "services/resource_coordinator/public/cpp/resource_coordinator_features.h"
|
| #include "services/resource_coordinator/public/cpp/resource_coordinator_interface.h"
|
| #include "services/service_manager/embedder/switches.h"
|
| #include "services/service_manager/public/cpp/binder_registry.h"
|
| @@ -528,6 +529,14 @@ void CreateMemoryCoordinatorHandle(
|
| std::move(request));
|
| }
|
|
|
| +void CreateResourceCoordinatorProcessInterface(
|
| + RenderProcessHostImpl* render_process_host,
|
| + const service_manager::BindSourceInfo& source_info,
|
| + resource_coordinator::mojom::CoordinationUnitRequest request) {
|
| + render_process_host->GetProcessResourceCoordinator()->service()->AddBinding(
|
| + std::move(request));
|
| +}
|
| +
|
| // Forwards service requests to Service Manager since the renderer cannot launch
|
| // out-of-process services on is own.
|
| template <typename R>
|
| @@ -1662,6 +1671,11 @@ void RenderProcessHostImpl::RegisterMojoInterfaces() {
|
| registry->AddInterface(
|
| base::Bind(&metrics::CreateSingleSampleMetricsProvider));
|
|
|
| + if (base::FeatureList::IsEnabled(features::kGlobalResourceCoordinator)) {
|
| + registry->AddInterface(base::Bind(
|
| + &CreateResourceCoordinatorProcessInterface, base::Unretained(this)));
|
| + }
|
| +
|
| if (base::FeatureList::IsEnabled(features::kOffMainThreadFetch)) {
|
| scoped_refptr<ServiceWorkerContextWrapper> service_worker_context(
|
| static_cast<ServiceWorkerContextWrapper*>(
|
|
|