| Index: third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp b/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..620a8f855fbde63aab8a962717d528180fae1d27
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioWorklet.cpp
|
| @@ -0,0 +1,47 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "modules/webaudio/AudioWorklet.h"
|
| +
|
| +#include "bindings/core/v8/V8Binding.h"
|
| +#include "core/dom/ExecutionContext.h"
|
| +#include "modules/webaudio/AudioWorkletGlobalScope.h"
|
| +
|
| +namespace blink {
|
| +
|
| +// static
|
| +AudioWorklet* AudioWorklet::create(LocalFrame* frame, ExecutionContext* executionContext)
|
| +{
|
| + AudioWorklet* worklet = new AudioWorklet(frame, executionContext);
|
| + worklet->suspendIfNeeded();
|
| + return worklet;
|
| +}
|
| +
|
| +AudioWorklet::AudioWorklet(LocalFrame* frame, ExecutionContext* executionContext)
|
| + : Worklet(executionContext)
|
| + , m_audioWorkletGlobalScope(AudioWorkletGlobalScope::create(frame, executionContext->url(), executionContext->userAgent(), executionContext->getSecurityOrigin(), toIsolate(executionContext)))
|
| +{
|
| +}
|
| +
|
| +AudioWorklet::~AudioWorklet()
|
| +{
|
| +}
|
| +
|
| +WorkletGlobalScope* AudioWorklet::workletGlobalScope() const
|
| +{
|
| + return m_audioWorkletGlobalScope.get();
|
| +}
|
| +
|
| +AudioWorkletProcessorDefinition* AudioWorklet::findDefinition(const String& name)
|
| +{
|
| + return m_audioWorkletGlobalScope->findDefinition(name);
|
| +}
|
| +
|
| +DEFINE_TRACE(AudioWorklet)
|
| +{
|
| + visitor->trace(m_audioWorkletGlobalScope);
|
| + Worklet::trace(visitor);
|
| +}
|
| +
|
| +} // namespace blink
|
|
|