| 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 2fc1b165e66f19102e73f88d982b7ddd9c21485d..27d4f7f90c3e34e6a13dbe173c4b43dd79bc0152 100644
|
| --- a/content/browser/renderer_host/render_process_host_impl.cc
|
| +++ b/content/browser/renderer_host/render_process_host_impl.cc
|
| @@ -44,6 +44,7 @@
|
| #include "base/tracked_objects.h"
|
| #include "build/build_config.h"
|
| #include "cc/base/switches.h"
|
| +#include "components/memory_coordinator/browser/memory_state_notifier.h"
|
| #include "components/scheduler/common/scheduler_switches.h"
|
| #include "components/tracing/common/tracing_switches.h"
|
| #include "content/browser/appcache/appcache_dispatcher_host.h"
|
| @@ -1404,6 +1405,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
| switches::kEnableIconNtp,
|
| switches::kEnableLowResTiling,
|
| switches::kEnableMediaSuspend,
|
| + switches::kEnableMemoryCoordinator,
|
| switches::kEnableInbandTextTracks,
|
| switches::kEnableLCDText,
|
| switches::kEnableLogging,
|
| @@ -2556,6 +2558,16 @@ void RenderProcessHostImpl::OnProcessLaunched() {
|
| child_process_launcher_->GetProcess().Handle());
|
| }
|
|
|
| + if (base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kEnableMemoryCoordinator) &&
|
| + mojo_application_host_) {
|
| + memory_coordinator::mojom::ChildMemoryCoordinatorPtr coordinator;
|
| + GetServiceRegistry()->ConnectToRemoteService(
|
| + mojo::GetProxy(&coordinator));
|
| + BrowserMainLoop::GetInstance()->memory_state_notifier()->AddChild(
|
| + std::move(coordinator));
|
| + }
|
| +
|
| // Not all platforms launch processes in the same backgrounded state. Make
|
| // sure |is_process_backgrounded_| reflects this platform's initial process
|
| // state.
|
|
|