chromium/third_party/blink/renderer/platform/instrumentation/memory_pressure_listener.cc

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#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 {

// Function defined in third_party/blink/public/web/blink.h.
void DecommitFreeableMemory() {}

// static
bool MemoryPressureListenerRegistry::is_low_end_device_ =;

// static
bool MemoryPressureListenerRegistry::IsLowEndDevice() {}

bool MemoryPressureListenerRegistry::
    IsLowEndDeviceOrPartialLowEndModeEnabled() {}

bool MemoryPressureListenerRegistry::
    IsLowEndDeviceOrPartialLowEndModeEnabledIncludingCanvasFontCache() {}

// static
bool MemoryPressureListenerRegistry::IsCurrentlyLowMemory() {}

// static
void MemoryPressureListenerRegistry::Initialize() {}

// static
void MemoryPressureListenerRegistry::SetIsLowEndDeviceForTesting(
    bool is_low_end_device) {}

// static
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 {}

}  // namespace blink