#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_PAGE_DISCARDING_HELPER_H_
#define CHROME_BROWSER_PERFORMANCE_MANAGER_POLICIES_PAGE_DISCARDING_HELPER_H_
#include <optional>
#include "base/functional/callback_forward.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/time/time.h"
#include "chrome/browser/performance_manager/mechanisms/page_discarder.h"
#include "chrome/browser/resource_coordinator/lifecycle_unit_state.mojom-shared.h"
#include "components/memory_pressure/reclaim_target.h"
#include "components/memory_pressure/unnecessary_discard_monitor.h"
#include "components/performance_manager/public/decorators/page_live_state_decorator.h"
#include "components/performance_manager/public/features.h"
#include "components/performance_manager/public/graph/graph.h"
#include "components/performance_manager/public/graph/graph_registered.h"
#include "components/performance_manager/public/graph/node_data_describer.h"
#include "components/performance_manager/public/graph/page_node.h"
namespace url_matcher {
class URLMatcher;
}
namespace performance_manager {
namespace mechanism {
class PageDiscarder;
}
namespace policies {
#if BUILDFLAG(IS_CHROMEOS)
constexpr base::TimeDelta kNonVisiblePagesUrgentProtectionTime =
base::TimeDelta();
#else
constexpr base::TimeDelta kNonVisiblePagesUrgentProtectionTime = …;
#endif
constexpr base::TimeDelta kTabAudioProtectionTime = …;
class PageNodeSortProxy { … };
class PageDiscardingHelper
: public GraphOwnedAndRegistered<PageDiscardingHelper>,
public NodeDataDescriberDefaultImpl { … };
}
}
#endif