chromium/third_party/blink/renderer/core/loader/web_bundle/script_web_bundle.h

// Copyright 2021 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_CORE_LOADER_WEB_BUNDLE_SCRIPT_WEB_BUNDLE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_WEB_BUNDLE_SCRIPT_WEB_BUNDLE_H_

#include "third_party/abseil-cpp/absl/types/variant.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/core/loader/web_bundle/script_web_bundle_error.h"
#include "third_party/blink/renderer/core/loader/web_bundle/script_web_bundle_rule.h"
#include "third_party/blink/renderer/core/script/script_element_base.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/member.h"
#include "third_party/blink/renderer/platform/heap/persistent.h"
#include "third_party/blink/renderer/platform/loader/fetch/subresource_web_bundle.h"
#include "third_party/blink/renderer/platform/wtf/casting.h"

namespace WTF {
class String;
}

namespace blink {

class Document;
class KURL;
class WebBundleLoader;

// ScriptLoader creates this for a script whose type is "webbundle".
//
// https://github.com/WICG/webpackage/blob/main/explainers/subresource-loading.md#script-based-api
class CORE_EXPORT ScriptWebBundle final
    : public GarbageCollected<ScriptWebBundle>,
      public SubresourceWebBundle {};

template <>
struct DowncastTraits<ScriptWebBundle> {};

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_LOADER_WEB_BUNDLE_SCRIPT_WEB_BUNDLE_H_