chromium/third_party/blink/renderer/bindings/core/v8/v8_compile_hints_for_streaming.h

// 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.

#ifndef THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_COMPILE_HINTS_FOR_STREAMING_H_
#define THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_COMPILE_HINTS_FOR_STREAMING_H_

#include <memory>

#include "base/types/pass_key.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_compile_hints_consumer.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "v8/include/v8.h"

namespace blink {

class CachedMetadata;
class KURL;

namespace v8_compile_hints {

class V8CrowdsourcedCompileHintsProducer;
class V8LocalCompileHintsConsumer;

// An utility class for using the CompileHints feature with
// v8::ScriptCompiler::StartStreaming. This class takes care of managing both
// crowdsourced and local compile hints. This can be created by calling
// Builder::Build() method. The Builder object can be created on the main
// thread and its Build() method can be called on non-main thread where we
// receive the CachedMetadata from the network service when the
// BackgroundResourceFetch feature is enabled.
class CORE_EXPORT CompileHintsForStreaming {};

}  // namespace v8_compile_hints
}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_BINDINGS_CORE_V8_V8_COMPILE_HINTS_FOR_STREAMING_H_