| 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 bdb6376a6942687f54cc3b72f7118ccf9a971cb3..c19275b7440a61b5da6a048e9d368f916612c4e0 100644
|
| --- a/components/memory_coordinator/child/child_memory_coordinator_impl.h
|
| +++ b/components/memory_coordinator/child/child_memory_coordinator_impl.h
|
| @@ -5,6 +5,8 @@
|
| #ifndef COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_H_
|
| #define COMPONENTS_MEMORY_COORDINATOR_CHILD_CHILD_MEMORY_COORDINATOR_IMPL_H_
|
|
|
| +#include <memory>
|
| +
|
| #include "base/compiler_specific.h"
|
| #include "base/observer_list_threadsafe.h"
|
| #include "components/memory_coordinator/common/memory_coordinator_client.h"
|
| @@ -13,6 +15,8 @@
|
|
|
| namespace memory_coordinator {
|
|
|
| +class BlinkMemoryCoordinatorClient;
|
| +
|
| // ChildMemoryCoordinatorImpl is the implementation of ChildMemoryCoordinator.
|
| // It lives in child processes and is responsible for dispatching memory events
|
| // to its clients.
|
| @@ -25,12 +29,19 @@ class ChildMemoryCoordinatorImpl
|
| scoped_refptr<ClientList> clients);
|
| ~ChildMemoryCoordinatorImpl() override;
|
|
|
| + static void Create(
|
| + mojo::InterfaceRequest<mojom::ChildMemoryCoordinator> request);
|
| +
|
| // mojom::ChildMemoryCoordinator implementations:
|
| void OnStateChange(mojom::MemoryState state) override;
|
| + void GetLastState(const GetLastStateCallback& callback) override;
|
|
|
| private:
|
| mojo::StrongBinding<mojom::ChildMemoryCoordinator> binding_;
|
| scoped_refptr<ClientList> clients_;
|
| + mojom::MemoryState state_ = mojom::MemoryState::UNKNOWN;
|
| +
|
| + std::unique_ptr<BlinkMemoryCoordinatorClient> blink_client_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(ChildMemoryCoordinatorImpl);
|
| };
|
|
|