#include "third_party/blink/renderer/modules/webaudio/audio_worklet_global_scope.h"
#include <memory>
#include <utility>
#include "base/auto_reset.h"
#include "third_party/blink/renderer/bindings/core/v8/idl_types.h"
#include "third_party/blink/renderer/bindings/core/v8/native_value_traits_impl.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/serialization/unpacked_serialized_script_value.h"
#include "third_party/blink/renderer/bindings/core/v8/worker_or_worklet_script_controller.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_audio_worklet_processor.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_blink_audio_worklet_process_callback.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_blink_audio_worklet_processor_constructor.h"
#include "third_party/blink/renderer/core/workers/global_scope_creation_params.h"
#include "third_party/blink/renderer/core/workers/worker_backing_thread.h"
#include "third_party/blink/renderer/core/workers/worker_thread.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_object_proxy.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_processor.h"
#include "third_party/blink/renderer/modules/webaudio/audio_worklet_processor_definition.h"
#include "third_party/blink/renderer/modules/webaudio/cross_thread_audio_worklet_processor_info.h"
#include "third_party/blink/renderer/platform/bindings/callback_method_retriever.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
namespace blink {
AudioWorkletGlobalScope::AudioWorkletGlobalScope(
std::unique_ptr<GlobalScopeCreationParams> creation_params,
WorkerThread* thread)
: … { … }
AudioWorkletGlobalScope::~AudioWorkletGlobalScope() = default;
void AudioWorkletGlobalScope::Dispose() { … }
void AudioWorkletGlobalScope::registerProcessor(
const String& name,
V8BlinkAudioWorkletProcessorConstructor* processor_ctor,
ExceptionState& exception_state) { … }
AudioWorkletProcessor* AudioWorkletGlobalScope::CreateProcessor(
const String& name,
MessagePortChannel message_port_channel,
scoped_refptr<SerializedScriptValue> node_options) { … }
AudioWorkletProcessorDefinition* AudioWorkletGlobalScope::FindDefinition(
const String& name) { … }
unsigned AudioWorkletGlobalScope::NumberOfRegisteredDefinitions() { … }
std::unique_ptr<Vector<CrossThreadAudioWorkletProcessorInfo>>
AudioWorkletGlobalScope::WorkletProcessorInfoListForSynchronization() { … }
std::unique_ptr<ProcessorCreationParams>
AudioWorkletGlobalScope::GetProcessorCreationParams() { … }
void AudioWorkletGlobalScope::SetCurrentFrame(size_t current_frame) { … }
void AudioWorkletGlobalScope::SetSampleRate(float sample_rate) { … }
double AudioWorkletGlobalScope::currentTime() const { … }
void AudioWorkletGlobalScope::SetObjectProxy(
AudioWorkletObjectProxy& object_proxy) { … }
void AudioWorkletGlobalScope::Trace(Visitor* visitor) const { … }
}