Index: third_party/WebKit/Source/platform/MemoryCoordinator.h |
diff --git a/third_party/WebKit/Source/platform/MemoryCoordinator.h b/third_party/WebKit/Source/platform/MemoryCoordinator.h |
index d1805cb3c2cb1b78e5f6ff9e144194bb3f8ee144..c19de9a211491c7d111206b892e96335dc6eea91 100644 |
--- a/third_party/WebKit/Source/platform/MemoryCoordinator.h |
+++ b/third_party/WebKit/Source/platform/MemoryCoordinator.h |
@@ -8,6 +8,7 @@ |
#include "platform/PlatformExport.h" |
#include "platform/heap/Handle.h" |
#include "public/platform/WebMemoryPressureLevel.h" |
+#include "public/platform/WebMemoryState.h" |
#include "wtf/Noncopyable.h" |
namespace blink { |
@@ -24,6 +25,8 @@ class PLATFORM_EXPORT MemoryCoordinatorClient : public GarbageCollectedMixin { |
// TODO(bashi): Deprecating. Remove this when MemoryPressureListener is |
// gone. |
virtual void onMemoryPressure(WebMemoryPressureLevel) {} |
+ |
+ virtual void onMemoryStateChange(MemoryState) {} |
}; |
// MemoryCoordinator listens to some events which could be opportunities |
@@ -44,11 +47,15 @@ class PLATFORM_EXPORT MemoryCoordinator final |
// gone. |
void onMemoryPressure(WebMemoryPressureLevel); |
+ void onMemoryStateChange(MemoryState); |
+ |
DECLARE_TRACE(); |
private: |
MemoryCoordinator(); |
+ void clearMemory(); |
+ |
HeapHashSet<WeakMember<MemoryCoordinatorClient>> m_clients; |
}; |