chromium/content/browser/preloading/prerenderer_impl.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/341324165): Fix and remove.
#pragma allow_unsafe_buffers
#endif

#include "content/browser/preloading/prerenderer_impl.h"

#include <vector>

#include "base/feature_list.h"
#include "content/browser/preloading/prefetch/no_vary_search_helper.h"
#include "content/browser/preloading/prefetch/prefetch_document_manager.h"
#include "content/browser/preloading/preloading.h"
#include "content/browser/preloading/preloading_attempt_impl.h"
#include "content/browser/preloading/preloading_data_impl.h"
#include "content/browser/preloading/preloading_trigger_type_impl.h"
#include "content/browser/preloading/prerender/prerender_attributes.h"
#include "content/browser/preloading/prerender/prerender_features.h"
#include "content/browser/preloading/prerender/prerender_final_status.h"
#include "content/browser/preloading/prerender/prerender_host_registry.h"
#include "content/browser/preloading/prerender/prerender_metrics.h"
#include "content/browser/preloading/prerender/prerender_navigation_utils.h"
#include "content/browser/preloading/prerender/prerender_new_tab_handle.h"
#include "content/browser/renderer_host/render_frame_host_delegate.h"
#include "content/public/browser/preloading_trigger_type.h"
#include "content/public/browser/web_contents.h"
#include "third_party/blink/public/common/features.h"

namespace content {

struct PrerendererImpl::PrerenderInfo {};

PrerendererImpl::PrerendererImpl(RenderFrameHost& render_frame_host)
    :{}

PrerendererImpl::~PrerendererImpl() {}

void PrerendererImpl::PrimaryPageChanged(Page& page) {}

// TODO(isaboori) Part of the logic in |ProcessCandidatesForPrerender| method is
// about making preloading decisions and could be moved to PreloadingDecider
// class.
void PrerendererImpl::ProcessCandidatesForPrerender(
    const std::vector<blink::mojom::SpeculationCandidatePtr>& candidates) {}

void PrerendererImpl::OnLCPPredicted() {}

bool PrerendererImpl::MaybePrerender(
    const blink::mojom::SpeculationCandidatePtr& candidate,
    const PreloadingPredictor& enacting_predictor,
    PreloadingConfidence confidence) {}

bool PrerendererImpl::ShouldWaitForPrerenderResult(const GURL& url) {}

void PrerendererImpl::OnCancel(int host_frame_tree_node_id,
                               const PrerenderCancellationReason& reason) {}

void PrerendererImpl::OnRegistryDestroyed() {}

void PrerendererImpl::SetPrerenderCancellationCallback(
    PrerenderCancellationCallback callback) {}

void PrerendererImpl::CancelStartedPrerenders() {}

void PrerendererImpl::ResetReceivedPrerendersCountForMetrics() {}

void PrerendererImpl::IncrementReceivedPrerendersCountForMetrics(
    PreloadingTriggerType trigger_type,
    blink::mojom::SpeculationEagerness eagerness) {}

void PrerendererImpl::RecordReceivedPrerendersCountToMetrics() {}

}  // namespace content