#include "third_party/blink/renderer/platform/instrumentation/memory_pressure_listener.h"
#include "base/feature_list.h"
#include "base/synchronization/lock.h"
#include "base/system/sys_info.h"
#include "base/trace_event/common/trace_event_common.h"
#include "build/build_config.h"
#include "partition_alloc/memory_reclaimer.h"
#include "third_party/blink/public/common/device_memory/approximated_device_memory.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/web/blink.h"
#include "third_party/blink/renderer/platform/fonts/font_global_context.h"
#include "third_party/blink/renderer/platform/graphics/image_decoding_store.h"
#include "third_party/blink/renderer/platform/heap/cross_thread_persistent.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/scheduler/public/non_main_thread.h"
#include "third_party/blink/renderer/platform/scheduler/public/post_cross_thread_task.h"
#include "third_party/blink/renderer/platform/wtf/allocator/partitions.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/wtf.h"
#if BUILDFLAG(IS_ANDROID)
#include "base/android/sys_utils.h"
#endif
namespace blink {
void DecommitFreeableMemory() { … }
bool MemoryPressureListenerRegistry::is_low_end_device_ = …;
bool MemoryPressureListenerRegistry::IsLowEndDevice() { … }
bool MemoryPressureListenerRegistry::
IsLowEndDeviceOrPartialLowEndModeEnabled() { … }
bool MemoryPressureListenerRegistry::
IsLowEndDeviceOrPartialLowEndModeEnabledIncludingCanvasFontCache() { … }
bool MemoryPressureListenerRegistry::IsCurrentlyLowMemory() { … }
void MemoryPressureListenerRegistry::Initialize() { … }
void MemoryPressureListenerRegistry::SetIsLowEndDeviceForTesting(
bool is_low_end_device) { … }
MemoryPressureListenerRegistry& MemoryPressureListenerRegistry::Instance() { … }
void MemoryPressureListenerRegistry::RegisterThread(NonMainThread* thread) { … }
void MemoryPressureListenerRegistry::UnregisterThread(NonMainThread* thread) { … }
MemoryPressureListenerRegistry::MemoryPressureListenerRegistry() = default;
void MemoryPressureListenerRegistry::RegisterClient(
MemoryPressureListener* client) { … }
void MemoryPressureListenerRegistry::UnregisterClient(
MemoryPressureListener* client) { … }
void MemoryPressureListenerRegistry::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel level) { … }
void MemoryPressureListenerRegistry::OnPurgeMemory() { … }
void MemoryPressureListenerRegistry::ClearThreadSpecificMemory() { … }
void MemoryPressureListenerRegistry::Trace(Visitor* visitor) const { … }
}