#include "content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_manager.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/metrics/histogram_functions.h"
#include "base/system/sys_info.h"
#include "base/task/thread_pool.h"
#include "base/time/default_tick_clock.h"
#include "content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot.h"
#include "content/browser/renderer_host/navigation_transitions/navigation_entry_screenshot_cache.h"
#include "content/browser/renderer_host/navigation_transitions/navigation_transition_config.h"
#include "content/browser/renderer_host/navigation_transitions/navigation_transition_utils.h"
#include "services/resource_coordinator/public/cpp/memory_instrumentation/browser_metrics.h"
#include "ui/display/screen.h"
namespace content {
NavigationEntryScreenshotManager::NavigationEntryScreenshotManager()
: … { … }
NavigationEntryScreenshotManager::~NavigationEntryScreenshotManager() = default;
void NavigationEntryScreenshotManager::OnScreenshotCached(
NavigationEntryScreenshotCacheEvictor* cache,
size_t size) { … }
void NavigationEntryScreenshotManager::OnScreenshotRemoved(
NavigationEntryScreenshotCacheEvictor* cache,
size_t size) { … }
void NavigationEntryScreenshotManager::OnScreenshotCompressed(
NavigationEntryScreenshotCacheEvictor* cache,
size_t old_size,
size_t new_size) { … }
void NavigationEntryScreenshotManager::OnVisibilityChanged(
NavigationEntryScreenshotCacheEvictor* cache) { … }
bool NavigationEntryScreenshotManager::IsEmpty() const { … }
void NavigationEntryScreenshotManager::Register(
NavigationEntryScreenshotCacheEvictor* cache) { … }
void NavigationEntryScreenshotManager::Unregister(
NavigationEntryScreenshotCacheEvictor* cache) { … }
base::TimeTicks NavigationEntryScreenshotManager::Now() const { … }
void NavigationEntryScreenshotManager::ScheduleCleanup(
base::TimeTicks last_visible_time) { … }
void NavigationEntryScreenshotManager::RunCleanup() { … }
void NavigationEntryScreenshotManager::EvictIfOutOfMemoryBudget() { … }
void NavigationEntryScreenshotManager::OnMemoryPressure(
base::MemoryPressureListener::MemoryPressureLevel memory_pressure_level) { … }
void NavigationEntryScreenshotManager::RecordScreenshotCacheSizeAfterDelay() { … }
void NavigationEntryScreenshotManager::RecordScreenshotCacheSize() { … }
}