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

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

Issue 2475293003: [RemotePlayback] No monitoring on low-end devices (Closed)
Patch Set: Use blink::initialize Created 4 years, 1 month 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/Source/platform/MemoryCoordinator.h
diff --git a/third_party/WebKit/Source/platform/MemoryCoordinator.h b/third_party/WebKit/Source/platform/MemoryCoordinator.h
index c5d7579ee18f6c33994ae162d0f7fa58e52d47dd..8a686c30108ce1e1a9556aa8887e18cb97a6f8a6 100644
--- a/third_party/WebKit/Source/platform/MemoryCoordinator.h
+++ b/third_party/WebKit/Source/platform/MemoryCoordinator.h
@@ -10,6 +10,7 @@
#include "public/platform/WebMemoryPressureLevel.h"
#include "public/platform/WebMemoryState.h"
#include "wtf/Noncopyable.h"
+#include "wtf/Optional.h"
namespace blink {
@@ -33,6 +34,7 @@ class PLATFORM_EXPORT MemoryCoordinator final
public:
static MemoryCoordinator& instance();
static bool isLowEndDevice();
+ static void initialize();
void registerClient(MemoryCoordinatorClient*);
void unregisterClient(MemoryCoordinatorClient*);
@@ -46,10 +48,16 @@ class PLATFORM_EXPORT MemoryCoordinator final
DECLARE_TRACE();
private:
+ friend class Internals;
+
+ static void setIsLowEndDeviceForTesting(bool);
+
MemoryCoordinator();
void clearMemory();
+ static bool s_isLowEndDevice;
+
HeapHashSet<WeakMember<MemoryCoordinatorClient>> m_clients;
};

Powered by Google App Engine
This is Rietveld 408576698