Index: components/memory_coordinator/child/child_memory_coordinator_impl.cc |
diff --git a/components/memory_coordinator/child/child_memory_coordinator_impl.cc b/components/memory_coordinator/child/child_memory_coordinator_impl.cc |
index d1f9f6c0009b4f79898e33e87711aedb5694c613..75889ed43f66e6463c0e9b3dc0ed578ca745b85b 100644 |
--- a/components/memory_coordinator/child/child_memory_coordinator_impl.cc |
+++ b/components/memory_coordinator/child/child_memory_coordinator_impl.cc |
@@ -7,26 +7,12 @@ |
namespace memory_coordinator { |
ChildMemoryCoordinatorImpl::ChildMemoryCoordinatorImpl( |
- shell::InterfaceProvider* remote_interfaces) |
- : binding_(this), clients_(new ClientList) { |
- if (remote_interfaces) { |
- remote_interfaces->GetInterface(mojo::GetProxy(&parent_)); |
- parent_->AddChild(binding_.CreateInterfacePtrAndBind()); |
- } |
-} |
+ mojo::InterfaceRequest<mojom::ChildMemoryCoordinator> request, |
+ scoped_refptr<ClientList> clients) |
+ : binding_(this, std::move(request)), |
+ clients_(clients) {} |
-ChildMemoryCoordinatorImpl::~ChildMemoryCoordinatorImpl() { |
-} |
- |
-void ChildMemoryCoordinatorImpl::RegisterClient( |
- MemoryCoordinatorClient* client) { |
- clients_->AddObserver(client); |
-} |
- |
-void ChildMemoryCoordinatorImpl::UnregisterClient( |
- MemoryCoordinatorClient* client) { |
- clients_->RemoveObserver(client); |
-} |
+ChildMemoryCoordinatorImpl::~ChildMemoryCoordinatorImpl() {} |
void ChildMemoryCoordinatorImpl::OnStateChange(mojom::MemoryState state) { |
clients_->Notify(FROM_HERE, &MemoryCoordinatorClient::OnMemoryStateChange, |