chromium/third_party/blink/renderer/core/loader/render_blocking_resource_manager.cc

// Copyright 2020 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/loader/render_blocking_resource_manager.h"

#include "base/feature_list.h"
#include "base/metrics/histogram_functions.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/core/css/font_face.h"
#include "third_party/blink/renderer/core/dom/document.h"
#include "third_party/blink/renderer/core/dom/element.h"
#include "third_party/blink/renderer/core/html/html_document.h"
#include "third_party/blink/renderer/core/html/html_link_element.h"
#include "third_party/blink/renderer/core/html_names.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/pending_link_preload.h"
#include "third_party/blink/renderer/core/script/script_element_base.h"

namespace blink {

namespace {

// 50ms is the overall best performing value in our experiments.
const base::TimeDelta kMaxRenderingDelayForFontPreloads =;

class ImperativeFontLoadFinishedCallback final
    : public GarbageCollected<ImperativeFontLoadFinishedCallback>,
      public FontFace::LoadFontCallback {};

}  // namespace

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

void RenderBlockingResourceManager::AddPendingFontPreload(
    const PendingLinkPreload& link) {}

void RenderBlockingResourceManager::AddImperativeFontLoading(
    FontFace* font_face) {}

void RenderBlockingResourceManager::RemovePendingFontPreload(
    const PendingLinkPreload& link) {}

void RenderBlockingResourceManager::RemoveImperativeFontLoading() {}

void RenderBlockingResourceManager::EnsureStartFontPreloadMaxBlockingTimer() {}

void RenderBlockingResourceManager::FontPreloadingTimerFired(TimerBase*) {}

void RenderBlockingResourceManager::AddPendingParsingElementLink(
    const AtomicString& id,
    const HTMLLinkElement* link) {}

void RenderBlockingResourceManager::RemovePendingParsingElement(
    const AtomicString& id,
    Element* element) {}

void RenderBlockingResourceManager::RemovePendingParsingElementLink(
    const AtomicString& id,
    const HTMLLinkElement* link) {}

void RenderBlockingResourceManager::ClearPendingParsingElements() {}

void RenderBlockingResourceManager::SetFontPreloadTimeoutForTest(
    base::TimeDelta timeout) {}

void RenderBlockingResourceManager::DisableFontPreloadTimeoutForTest() {}

bool RenderBlockingResourceManager::FontPreloadTimerIsActiveForTest() const {}

bool RenderBlockingResourceManager::AddPendingStylesheet(
    const Node& owner_node) {}

bool RenderBlockingResourceManager::RemovePendingStylesheet(
    const Node& owner_node) {}

void RenderBlockingResourceManager::AddPendingScript(
    const ScriptElementBase& script) {}

void RenderBlockingResourceManager::RemovePendingScript(
    const ScriptElementBase& script) {}

void RenderBlockingResourceManager::WillInsertDocumentBody() {}

void RenderBlockingResourceManager::RenderBlockingResourceUnblocked() {}

void RenderBlockingResourceManager::EnsureStartFontPreloadMaxFCPDelayTimer() {}

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

}  // namespace blink