chromium/chrome/browser/page_load_metrics/observers/new_tab_page_page_load_metrics_observer.cc

// Copyright 2024 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "chrome/browser/page_load_metrics/observers/new_tab_page_page_load_metrics_observer.h"

#include <algorithm>

#include "chrome/browser/search/search.h"
#include "components/page_load_metrics/browser/navigation_handle_user_data.h"
#include "components/page_load_metrics/browser/page_load_metrics_util.h"
#include "content/public/browser/navigation_handle.h"
#include "services/metrics/public/cpp/ukm_source.h"

namespace {

const char kNewTabPagePrerenderNavigationToActivation[] =;
const char kNewTabPageNavigationOrActivationToFirstContentfulPaint[] =;
const char kNewTabPageNavigationOrActivationToFirstMeaningfulPaint[] =;
const char kNewTabPageNavigationOrActivationToLargestContentfulPaint[] =;
}  // namespace

NewTabPagePageLoadMetricsObserver::NewTabPagePageLoadMetricsObserver() =
    default;

NewTabPagePageLoadMetricsObserver::~NewTabPagePageLoadMetricsObserver() =
    default;

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
NewTabPagePageLoadMetricsObserver::OnStart(
    content::NavigationHandle* navigation_handle,
    const GURL& currently_committed_url,
    bool started_in_foreground) {}

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
NewTabPagePageLoadMetricsObserver::OnPrerenderStart(
    content::NavigationHandle* navigation_handle,
    const GURL& currently_committed_url) {}

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
NewTabPagePageLoadMetricsObserver::OnFencedFramesStart(
    content::NavigationHandle* navigation_handle,
    const GURL& currently_committed_url) {}

void NewTabPagePageLoadMetricsObserver::DidActivatePrerenderedPage(
    content::NavigationHandle* navigation_handle) {}

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
NewTabPagePageLoadMetricsObserver::OnCommit(
    content::NavigationHandle* navigation_handle) {}

void NewTabPagePageLoadMetricsObserver::OnFirstContentfulPaintInPage(
    const page_load_metrics::mojom::PageLoadTiming& timing) {}

void NewTabPagePageLoadMetricsObserver::
    OnFirstMeaningfulPaintInMainFrameDocument(
        const page_load_metrics::mojom::PageLoadTiming& timing) {}

page_load_metrics::PageLoadMetricsObserver::ObservePolicy
NewTabPagePageLoadMetricsObserver::FlushMetricsOnAppEnterBackground(
    const page_load_metrics::mojom::PageLoadTiming& timing) {}

void NewTabPagePageLoadMetricsObserver::OnComplete(
    const page_load_metrics::mojom::PageLoadTiming& timing) {}

void NewTabPagePageLoadMetricsObserver::RecordSessionEndHistograms(
    const page_load_metrics::mojom::PageLoadTiming& timing) {}