Index: components/memory_coordinator/child/child_memory_coordinator_impl.h |
diff --git a/components/memory_coordinator/child/child_memory_coordinator_impl.h b/components/memory_coordinator/child/child_memory_coordinator_impl.h |
index 7471c539f56d2ef5a23a89a806ca00bff94b5261..bdb6376a6942687f54cc3b72f7118ccf9a971cb3 100644 |
--- a/components/memory_coordinator/child/child_memory_coordinator_impl.h |
+++ b/components/memory_coordinator/child/child_memory_coordinator_impl.h |
@@ -8,11 +8,8 @@ |
#include "base/compiler_specific.h" |
#include "base/observer_list_threadsafe.h" |
#include "components/memory_coordinator/common/memory_coordinator_client.h" |
-#include "components/memory_coordinator/common/memory_coordinator_features.h" |
#include "components/memory_coordinator/public/interfaces/child_memory_coordinator.mojom.h" |
-#include "components/memory_coordinator/public/interfaces/memory_coordinator.mojom.h" |
-#include "mojo/public/cpp/bindings/binding.h" |
-#include "services/shell/public/cpp/interface_provider.h" |
+#include "mojo/public/cpp/bindings/strong_binding.h" |
namespace memory_coordinator { |
@@ -22,23 +19,18 @@ |
class ChildMemoryCoordinatorImpl |
: NON_EXPORTED_BASE(public mojom::ChildMemoryCoordinator) { |
public: |
- ChildMemoryCoordinatorImpl(shell::InterfaceProvider* remote_interfaces); |
+ using ClientList = base::ObserverListThreadSafe<MemoryCoordinatorClient>; |
+ ChildMemoryCoordinatorImpl( |
+ mojo::InterfaceRequest<mojom::ChildMemoryCoordinator> request, |
+ scoped_refptr<ClientList> clients); |
~ChildMemoryCoordinatorImpl() override; |
- |
- // Registers/unregisters a client. Does not take ownership of client. |
- void RegisterClient(MemoryCoordinatorClient* client); |
- void UnregisterClient(MemoryCoordinatorClient* client); |
// mojom::ChildMemoryCoordinator implementations: |
void OnStateChange(mojom::MemoryState state) override; |
private: |
- friend class ChildMemoryCoordinatorImplTest; |
- |
- mojo::Binding<mojom::ChildMemoryCoordinator> binding_; |
- using ClientList = base::ObserverListThreadSafe<MemoryCoordinatorClient>; |
+ mojo::StrongBinding<mojom::ChildMemoryCoordinator> binding_; |
scoped_refptr<ClientList> clients_; |
- mojom::MemoryCoordinatorHandlePtr parent_; |
DISALLOW_COPY_AND_ASSIGN(ChildMemoryCoordinatorImpl); |
}; |