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 f859866b27795aadc62590287556e4b35e4f7702..66fc4ef5423b1853855fff03df1c53ecb1ef1660 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" |
@@ -2561,6 +2562,13 @@ void RenderProcessHostImpl::OnProcessLaunched() { |
child_process_launcher_->GetProcess().Handle()); |
} |
+ if (memory_coordinator::IsEnabled() && mojo_application_host_) { |
+ memory_coordinator::mojom::ChildMemoryCoordinatorPtr coordinator; |
+ GetRemoteInterfaces()->GetInterface(&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. |