Chromium Code Reviews| Index: content/renderer/render_thread_impl.cc |
| diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
| index 304c589e7c69caf194802ab4eaaeb0913aafa6e7..4daf2bacc634a7c70819b077391847d2b6d653bd 100644 |
| --- a/content/renderer/render_thread_impl.cc |
| +++ b/content/renderer/render_thread_impl.cc |
| @@ -46,6 +46,7 @@ |
| #include "cc/raster/task_graph_runner.h" |
| #include "cc/trees/layer_tree_host_common.h" |
| #include "cc/trees/layer_tree_settings.h" |
| +#include "components/memory_coordinator/child/child_memory_coordinator_impl.h" |
| #include "components/scheduler/child/compositor_worker_scheduler.h" |
| #include "components/scheduler/child/webthread_base.h" |
| #include "components/scheduler/child/webthread_impl_for_worker_scheduler.h" |
| @@ -814,6 +815,14 @@ void RenderThreadImpl::Init( |
| base::Bind(&RenderThreadImpl::OnSyncMemoryPressure, |
| base::Unretained(this)))); |
| + if (memory_coordinator::IsEnabled()) { |
| + memory_coordinator_.reset( |
| + new memory_coordinator::ChildMemoryCoordinatorImpl()); |
| + GetInterfaceRegistry()->AddInterface( |
| + base::Bind(&memory_coordinator::ChildMemoryCoordinatorImpl::Bind, |
| + base::Unretained(memory_coordinator_.get()))); |
|
dcheng
2016/07/08 07:10:35
Does it make sense to just have memory_coordinator
bashi
2016/07/08 07:32:39
I didn't know base::Owned(). Thanks. Probably we c
|
| + } |
| + |
| int num_raster_threads = 0; |
| std::string string_value = |
| command_line.GetSwitchValueASCII(switches::kNumRasterThreads); |