#include "chrome/browser/page_load_metrics/observers/loading_predictor_page_load_metrics_observer.h"
#include <memory>
#include "chrome/browser/predictors/loading_predictor.h"
#include "chrome/browser/predictors/loading_predictor_factory.h"
#include "chrome/browser/predictors/loading_predictor_tab_helper.h"
#include "chrome/browser/predictors/resource_prefetch_predictor.h"
#include "chrome/browser/profiles/profile.h"
#include "components/page_load_metrics/browser/page_load_metrics_util.h"
#include "content/public/browser/web_contents.h"
namespace internal {
const char kHistogramLoadingPredictorFirstContentfulPaintPreconnectable[] = …;
const char kHistogramLoadingPredictorFirstMeaningfulPaintPreconnectable[] = …;
}
std::unique_ptr<LoadingPredictorPageLoadMetricsObserver>
LoadingPredictorPageLoadMetricsObserver::CreateIfNeeded(
content::WebContents* web_contents) { … }
LoadingPredictorPageLoadMetricsObserver::
LoadingPredictorPageLoadMetricsObserver(
predictors::ResourcePrefetchPredictor* predictor,
predictors::LoadingPredictorTabHelper* predictor_tab_helper)
: … { … }
LoadingPredictorPageLoadMetricsObserver::
~LoadingPredictorPageLoadMetricsObserver() { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
LoadingPredictorPageLoadMetricsObserver::OnStart(
content::NavigationHandle* navigation_handle,
const GURL& currently_commited_url,
bool started_in_foreground) { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
LoadingPredictorPageLoadMetricsObserver::OnFencedFramesStart(
content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url) { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
LoadingPredictorPageLoadMetricsObserver::OnPrerenderStart(
content::NavigationHandle* navigation_handle,
const GURL& currently_committed_url) { … }
void LoadingPredictorPageLoadMetricsObserver::DidActivatePrerenderedPage(
content::NavigationHandle* navigation_handle) { … }
page_load_metrics::PageLoadMetricsObserver::ObservePolicy
LoadingPredictorPageLoadMetricsObserver::OnHidden(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }
void LoadingPredictorPageLoadMetricsObserver::OnFirstContentfulPaintInPage(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }
void LoadingPredictorPageLoadMetricsObserver::
OnFirstMeaningfulPaintInMainFrameDocument(
const page_load_metrics::mojom::PageLoadTiming& timing) { … }