#include "third_party/blink/renderer/core/workers/worklet.h"
#include <optional>
#include "base/task/single_thread_task_runner.h"
#include "services/network/public/mojom/fetch_api.mojom-blink.h"
#include "third_party/blink/public/mojom/use_counter/metrics/web_feature.mojom-blink.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/public/platform/web_url_request.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_worklet_options.h"
#include "third_party/blink/renderer/core/dom/dom_exception.h"
#include "third_party/blink/renderer/core/fetch/request.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/loader/worker_resource_timing_notifier_impl.h"
#include "third_party/blink/renderer/core/workers/worklet_pending_tasks.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/instrumentation/use_counter.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher.h"
#include "third_party/blink/renderer/platform/loader/fetch/resource_fetcher_properties.h"
#include "third_party/blink/renderer/platform/wtf/wtf.h"
namespace blink {
Worklet::Worklet(LocalDOMWindow& window)
: … { … }
Worklet::~Worklet() { … }
void Worklet::Dispose() { … }
ScriptPromise<IDLUndefined> Worklet::addModule(
ScriptState* script_state,
const String& module_url,
const WorkletOptions* options,
ExceptionState& exception_state) { … }
void Worklet::ContextDestroyed() { … }
bool Worklet::HasPendingTasks() const { … }
void Worklet::FinishPendingTasks(WorkletPendingTasks* pending_tasks) { … }
WorkletGlobalScopeProxy* Worklet::FindAvailableGlobalScope() { … }
void Worklet::FetchAndInvokeScript(const KURL& module_url_record,
const String& credentials,
WorkletPendingTasks* pending_tasks) { … }
wtf_size_t Worklet::SelectGlobalScope() { … }
void Worklet::Trace(Visitor* visitor) const { … }
}