chromium/third_party/blink/renderer/core/paint/timing/paint_timing.cc

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

#include "third_party/blink/renderer/core/paint/timing/paint_timing.h"

#include <memory>
#include <utility>

#include "base/metrics/histogram_functions.h"
#include "base/metrics/histogram_macros.h"
#include "base/time/default_tick_clock.h"
#include "third_party/blink/public/web/web_performance_metrics_for_reporting.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/frame_request_callback_collection.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/loader/interactive_detector.h"
#include "third_party/blink/renderer/core/loader/progress_tracker.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/timing/dom_window_performance.h"
#include "third_party/blink/renderer/core/timing/performance_timing_for_reporting.h"
#include "third_party/blink/renderer/core/timing/window_performance.h"
#include "third_party/blink/renderer/platform/graphics/paint/ignore_paint_timing_scope.h"
#include "third_party/blink/renderer/platform/heap/cross_thread_handle.h"
#include "third_party/blink/renderer/platform/instrumentation/resource_coordinator/document_resource_coordinator.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/scheduler/public/frame_scheduler.h"
#include "third_party/blink/renderer/platform/wtf/cross_thread_functional.h"
#include "third_party/blink/renderer/platform/wtf/wtf.h"

namespace blink {

namespace {

WindowPerformance* GetPerformanceInstance(LocalFrame* frame) {}

}  // namespace

class RecodingTimeAfterBackForwardCacheRestoreFrameCallback
    : public FrameCallback {};

// static
const char PaintTiming::kSupplementName[] =;

// static
PaintTiming& PaintTiming::From(Document& document) {}

// static
const PaintTiming* PaintTiming::From(const Document& document) {}

void PaintTiming::MarkFirstPaint() {}

void PaintTiming::MarkFirstContentfulPaint() {}

void PaintTiming::MarkFirstImagePaint() {}

void PaintTiming::MarkFirstEligibleToPaint() {}

// We deliberately use |paint_details_.first_paint_| here rather than
// |paint_details_.first_paint_presentation_|, because
// |paint_details_.first_paint_presentation_| is set asynchronously and we need
// to be able to rely on a synchronous check that SetFirstPaintPresentation
// hasn't been scheduled or run.
void PaintTiming::MarkIneligibleToPaint() {}

void PaintTiming::SetFirstMeaningfulPaintCandidate(base::TimeTicks timestamp) {}

void PaintTiming::SetFirstMeaningfulPaint(
    base::TimeTicks presentation_time,
    FirstMeaningfulPaintDetector::HadUserInput had_input) {}

void PaintTiming::NotifyPaint(bool is_first_paint,
                              bool text_painted,
                              bool image_painted) {}

void PaintTiming::SetTickClockForTesting(const base::TickClock* clock) {}

void PaintTiming::Trace(Visitor* visitor) const {}

PaintTiming::PaintTiming(Document& document)
    :{}

LocalFrame* PaintTiming::GetFrame() const {}

void PaintTiming::NotifyPaintTimingChanged() {}

void PaintTiming::SetFirstPaint(base::TimeTicks stamp) {}

void PaintTiming::SetFirstContentfulPaint(base::TimeTicks stamp) {}

void PaintTiming::RegisterNotifyPresentationTime(PaintEvent event) {}

void PaintTiming::
    RegisterNotifyFirstPaintAfterBackForwardCacheRestorePresentationTime(
        wtf_size_t index) {}

void PaintTiming::RegisterNotifyPresentationTime(ReportTimeCallback callback) {}

void PaintTiming::ReportPresentationTime(
    PaintEvent event,
    const viz::FrameTimingDetails& presentation_details) {}

void PaintTiming::RecordFirstContentfulPaintTimingMetrics(
    const viz::FrameTimingDetails& frame_timing_details) {}

void PaintTiming::ReportFirstPaintAfterBackForwardCacheRestorePresentationTime(
    wtf_size_t index,
    const viz::FrameTimingDetails& presentation_details) {}

void PaintTiming::SetFirstPaintPresentation(base::TimeTicks stamp) {}

void PaintTiming::SetFirstContentfulPaintPresentation(base::TimeTicks stamp) {}

void PaintTiming::SetFirstImagePaintPresentation(base::TimeTicks stamp) {}

void PaintTiming::SetFirstPaintAfterBackForwardCacheRestorePresentation(
    base::TimeTicks stamp,
    wtf_size_t index) {}

void PaintTiming::SetRequestAnimationFrameAfterBackForwardCacheRestore(
    wtf_size_t index,
    size_t count) {}

void PaintTiming::OnRestoredFromBackForwardCache() {}

void PaintTiming::SoftNavigationDetected() {}

}  // namespace blink