#include "third_party/blink/renderer/controller/memory_usage_monitor.h"
#include "base/observer_list.h"
#include "base/task/single_thread_task_runner.h"
#include "third_party/blink/renderer/platform/heap/process_heap.h"
#include "third_party/blink/renderer/platform/scheduler/public/main_thread.h"
#include "third_party/blink/renderer/platform/scheduler/public/main_thread_scheduler.h"
#include "third_party/blink/renderer/platform/wtf/allocator/partitions.h"
#include "v8/include/v8.h"
namespace blink {
namespace {
constexpr base::TimeDelta kPingInterval = …;
}
MemoryUsageMonitor::MemoryUsageMonitor() { … }
MemoryUsageMonitor::MemoryUsageMonitor(
scoped_refptr<base::SingleThreadTaskRunner> task_runner_for_testing,
const base::TickClock* clock_for_testing)
: … { … }
void MemoryUsageMonitor::AddObserver(Observer* observer) { … }
void MemoryUsageMonitor::RemoveObserver(Observer* observer) { … }
bool MemoryUsageMonitor::HasObserver(Observer* observer) { … }
void MemoryUsageMonitor::StartMonitoringIfNeeded() { … }
void MemoryUsageMonitor::StopMonitoring() { … }
MemoryUsage MemoryUsageMonitor::GetCurrentMemoryUsage() { … }
void MemoryUsageMonitor::GetV8MemoryUsage(MemoryUsage& usage) { … }
void MemoryUsageMonitor::GetBlinkMemoryUsage(MemoryUsage& usage) { … }
void MemoryUsageMonitor::TimerFired() { … }
}