chromium/third_party/blink/renderer/core/workers/worklet_global_scope.cc

// Copyright 2016 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/workers/worklet_global_scope.h"

#include <memory>

#include "base/task/single_thread_task_runner.h"
#include "services/metrics/public/cpp/mojo_ukm_recorder.h"
#include "third_party/blink/public/common/thread_safe_browser_interface_broker_proxy.h"
#include "third_party/blink/public/mojom/devtools/inspector_issue.mojom-blink.h"
#include "third_party/blink/public/mojom/fetch/fetch_api_request.mojom-blink.h"
#include "third_party/blink/public/platform/browser_interface_broker_proxy.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.h"
#include "third_party/blink/renderer/core/execution_context/agent.h"
#include "third_party/blink/renderer/core/frame/frame_console.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/inspector/console_message.h"
#include "third_party/blink/renderer/core/inspector/console_message_storage.h"
#include "third_party/blink/renderer/core/inspector/inspector_audits_issue.h"
#include "third_party/blink/renderer/core/inspector/inspector_issue_storage.h"
#include "third_party/blink/renderer/core/inspector/main_thread_debugger.h"
#include "third_party/blink/renderer/core/inspector/worker_inspector_controller.h"
#include "third_party/blink/renderer/core/inspector/worker_thread_debugger.h"
#include "third_party/blink/renderer/core/loader/document_loader.h"
#include "third_party/blink/renderer/core/origin_trials/origin_trial_context.h"
#include "third_party/blink/renderer/core/probe/core_probes.h"
#include "third_party/blink/renderer/core/script/modulator.h"
#include "third_party/blink/renderer/core/workers/global_scope_creation_params.h"
#include "third_party/blink/renderer/core/workers/worker_reporting_proxy.h"
#include "third_party/blink/renderer/core/workers/worker_thread.h"
#include "third_party/blink/renderer/core/workers/worklet_module_responses_map.h"
#include "third_party/blink/renderer/core/workers/worklet_module_tree_client.h"
#include "third_party/blink/renderer/core/workers/worklet_pending_tasks.h"
#include "third_party/blink/renderer/platform/bindings/source_location.h"
#include "third_party/blink/renderer/platform/loader/fetch/fetch_client_settings_object_snapshot.h"

namespace blink {

WorkletGlobalScope::WorkletGlobalScope(
    std::unique_ptr<GlobalScopeCreationParams> creation_params,
    WorkerReportingProxy& reporting_proxy,
    LocalFrame* frame)
    :{}

WorkletGlobalScope::WorkletGlobalScope(
    std::unique_ptr<GlobalScopeCreationParams> creation_params,
    WorkerReportingProxy& reporting_proxy,
    WorkerThread* worker_thread)
    :{}

// Partial implementation of the "set up a worklet environment settings object"
// algorithm:
// https://drafts.css-houdini.org/worklets/#script-settings-for-worklets
WorkletGlobalScope::WorkletGlobalScope(
    std::unique_ptr<GlobalScopeCreationParams> creation_params,
    WorkerReportingProxy& reporting_proxy,
    v8::Isolate* isolate,
    ThreadType thread_type,
    LocalFrame* frame,
    WorkerThread* worker_thread)
    :{}

WorkletGlobalScope::~WorkletGlobalScope() = default;

const BrowserInterfaceBrokerProxy&
WorkletGlobalScope::GetBrowserInterfaceBroker() const {}

bool WorkletGlobalScope::IsMainThreadWorkletGlobalScope() const {}

bool WorkletGlobalScope::IsThreadedWorkletGlobalScope() const {}

ExecutionContext* WorkletGlobalScope::GetExecutionContext() const {}

bool WorkletGlobalScope::IsContextThread() const {}

void WorkletGlobalScope::AddConsoleMessageImpl(ConsoleMessage* console_message,
                                               bool discard_duplicates) {}

void WorkletGlobalScope::AddInspectorIssue(AuditsIssue issue) {}

void WorkletGlobalScope::ExceptionThrown(ErrorEvent* error_event) {}

void WorkletGlobalScope::Dispose() {}

WorkerThread* WorkletGlobalScope::GetThread() const {}

const base::UnguessableToken& WorkletGlobalScope::GetDevToolsToken() const {}

CodeCacheHost* WorkletGlobalScope::GetCodeCacheHost() {}

CoreProbeSink* WorkletGlobalScope::GetProbeSink() {}

scoped_refptr<base::SingleThreadTaskRunner> WorkletGlobalScope::GetTaskRunner(
    TaskType task_type) {}

FrameOrWorkerScheduler* WorkletGlobalScope::GetScheduler() {}

LocalFrame* WorkletGlobalScope::GetFrame() const {}

// Implementation of the first half of the "fetch and invoke a worklet script"
// algorithm:
// https://drafts.css-houdini.org/worklets/#fetch-and-invoke-a-worklet-script
void WorkletGlobalScope::FetchAndInvokeScript(
    const KURL& module_url_record,
    network::mojom::CredentialsMode credentials_mode,
    const FetchClientSettingsObjectSnapshot& outside_settings_object,
    WorkerResourceTimingNotifier& outside_resource_timing_notifier,
    scoped_refptr<base::SingleThreadTaskRunner> outside_settings_task_runner,
    WorkletPendingTasks* pending_tasks) {}

KURL WorkletGlobalScope::CompleteURL(const String& url) const {}

bool WorkletGlobalScope::CrossOriginIsolatedCapability() const {}

bool WorkletGlobalScope::IsIsolatedContext() const {}

ukm::UkmRecorder* WorkletGlobalScope::UkmRecorder() {}

ukm::SourceId WorkletGlobalScope::UkmSourceID() const {}

mojo::PendingRemote<mojom::blink::BlobURLStore>
WorkletGlobalScope::TakeBlobUrlStorePendingRemote() {}

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

bool WorkletGlobalScope::HasPendingActivity() const {}

}  // namespace blink