| 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..bb2ab3fa3c758757875fe409c239372aaaaec73e 100644
|
| --- a/third_party/WebKit/Source/platform/MemoryCoordinator.h
|
| +++ b/third_party/WebKit/Source/platform/MemoryCoordinator.h
|
| @@ -32,8 +32,16 @@ class PLATFORM_EXPORT MemoryCoordinator final
|
|
|
| public:
|
| static MemoryCoordinator& instance();
|
| +
|
| + // Whether the device Blink runs on is a low-end device.
|
| + // Can be overridden in layout tests via internals.
|
| static bool isLowEndDevice();
|
|
|
| + // Caches whether this device is a low-end device in a static member.
|
| + // instance() is not used as it's a heap allocated object - meaning it's not
|
| + // thread-safe as well as might break tests counting the heap size.
|
| + static void initialize();
|
| +
|
| void registerClient(MemoryCoordinatorClient*);
|
| void unregisterClient(MemoryCoordinatorClient*);
|
|
|
| @@ -46,10 +54,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;
|
| };
|
|
|
|
|