Index: components/memory_coordinator/browser/memory_coordinator.h |
diff --git a/components/memory_coordinator/browser/memory_coordinator.h b/components/memory_coordinator/browser/memory_coordinator.h |
index 3cf4fb585904e092512971d40ea0d1ad053c3894..51dcb5df58a42d546d5806dd855262921e7eb76a 100644 |
--- a/components/memory_coordinator/browser/memory_coordinator.h |
+++ b/components/memory_coordinator/browser/memory_coordinator.h |
@@ -5,6 +5,7 @@ |
#ifndef COMPONENTS_MEMORY_COORDINATOR_BROWSER_MEMORY_COORDINATOR_H_ |
#define COMPONENTS_MEMORY_COORDINATOR_BROWSER_MEMORY_COORDINATOR_H_ |
+#include "base/memory/memory_pressure_monitor.h" |
#include "components/memory_coordinator/common/client_registry.h" |
#include "components/memory_coordinator/public/interfaces/memory_coordinator.mojom.h" |
#include "mojo/public/cpp/bindings/binding.h" |
@@ -30,6 +31,12 @@ class MemoryCoordinator : public ClientRegistry { |
private: |
void OnConnectionError(int render_process_id); |
+ // Called when MemoryPressureMonitor detects memory pressure. |
+ void OnMemoryPressure(base::MemoryPressureMonitor::MemoryPressureLevel level); |
+ |
+ // A callback invoked when MemoryPressureMonitor detects memory pressure. |
+ base::MemoryPressureMonitor::DispatchCallback pressure_level_dispatcher_; |
+ |
// Mappings of RenderProcessHost::GetID() -> MemoryCoordinatorHandleImpl. |
// A mapping is added when a renderer connects to MemoryCoordinator and |
// removed automatically when a underlying binding is disconnected. |