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

Unified Diff: third_party/WebKit/public/web/WebMemoryCoordinator.h

Issue 2094583002: Add MemoryCoordinator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: gyp Created 4 years, 6 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
Index: third_party/WebKit/public/web/WebMemoryCoordinator.h
diff --git a/third_party/WebKit/public/web/WebMemoryCoordinator.h b/third_party/WebKit/public/web/WebMemoryCoordinator.h
index 306b961c12f4523ff7079eacaa6deee5320a9b03..68457a453c82ba1cf294ce152da5f4560f20ff51 100644
--- a/third_party/WebKit/public/web/WebMemoryCoordinator.h
+++ b/third_party/WebKit/public/web/WebMemoryCoordinator.h
@@ -10,10 +10,18 @@
namespace blink {
+enum class WebMemoryAllocationMode {
+ Normal,
+ Throttled,
+};
+
class WebMemoryCoordinator {
public:
// Called when a memory pressure notification is received.
BLINK_EXPORT static void onMemoryPressure(WebMemoryPressureLevel);
+
+ // Called when the system wants to throttle/unthrottle memory allocation.
+ BLINK_EXPORT static void setAllocationMode(WebMemoryAllocationMode);
haraken 2016/06/27 02:17:07 Would it make more sense to introduce onMemoryStat
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698