#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "chrome/browser/resource_coordinator/tab_load_tracker.h"
#include <utility>
#include "base/check_op.h"
#include "base/containers/contains.h"
#include "base/not_fatal_until.h"
#include "base/observer_list.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/resource_coordinator/resource_coordinator_parts.h"
#include "components/no_state_prefetch/browser/no_state_prefetch_contents.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
namespace resource_coordinator {
namespace {
static constexpr TabLoadTracker::LoadingState UNLOADED = …;
static constexpr TabLoadTracker::LoadingState LOADING = …;
static constexpr TabLoadTracker::LoadingState LOADED = …;
}
TabLoadTracker::~TabLoadTracker() = default;
TabLoadTracker* TabLoadTracker::Get() { … }
TabLoadTracker::LoadingState TabLoadTracker::GetLoadingState(
content::WebContents* web_contents) const { … }
size_t TabLoadTracker::GetTabCount() const { … }
size_t TabLoadTracker::GetTabCount(LoadingState loading_state) const { … }
size_t TabLoadTracker::GetUnloadedTabCount() const { … }
size_t TabLoadTracker::GetLoadingTabCount() const { … }
size_t TabLoadTracker::GetLoadedTabCount() const { … }
void TabLoadTracker::AddObserver(Observer* observer) { … }
void TabLoadTracker::RemoveObserver(Observer* observer) { … }
void TabLoadTracker::TransitionStateForTesting(
content::WebContents* web_contents,
LoadingState loading_state) { … }
TabLoadTracker::TabLoadTracker() = default;
void TabLoadTracker::StartTracking(content::WebContents* web_contents) { … }
void TabLoadTracker::StopTracking(content::WebContents* web_contents) { … }
void TabLoadTracker::PrimaryPageChanged(content::WebContents* web_contents) { … }
void TabLoadTracker::DidStopLoading(content::WebContents* web_contents) { … }
void TabLoadTracker::RenderProcessGone(content::WebContents* web_contents,
base::TerminationStatus status) { … }
void TabLoadTracker::OnPageStoppedLoading(content::WebContents* web_contents) { … }
TabLoadTracker::LoadingState TabLoadTracker::DetermineLoadingState(
content::WebContents* web_contents) { … }
void TabLoadTracker::TransitionState(TabMap::iterator it,
LoadingState loading_state) { … }
TabLoadTracker::Observer::Observer() { … }
TabLoadTracker::Observer::~Observer() { … }
}