Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(913)

Unified Diff: third_party/WebKit/Source/platform/MemoryCoordinator.h

Issue 2402643002: Make RenderThreadImpl a client of memory coordinator (Closed)
Patch Set: Address on haraken's review Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | third_party/WebKit/Source/platform/MemoryCoordinator.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
};
« no previous file with comments | « content/renderer/render_thread_impl.cc ('k') | third_party/WebKit/Source/platform/MemoryCoordinator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698