| Index: third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
|
| diff --git a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..70cfd2ae8e036bcc0586a0a93d4d1eaf9321847c
|
| --- /dev/null
|
| +++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
|
| @@ -0,0 +1,44 @@
|
| +// 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.
|
| +
|
| +#ifndef AudioWorkletGlobalScope_h
|
| +#define AudioWorkletGlobalScope_h
|
| +
|
| +#include "bindings/core/v8/ScriptValue.h"
|
| +#include "core/dom/ExecutionContext.h"
|
| +#include "modules/ModulesExport.h"
|
| +#include "modules/worklet/WorkletGlobalScope.h"
|
| +
|
| +namespace blink {
|
| +
|
| +class AudioWorkletProcessorDefinition;
|
| +class ExceptionState;
|
| +
|
| +class MODULES_EXPORT AudioWorkletGlobalScope : public WorkletGlobalScope {
|
| + DEFINE_WRAPPERTYPEINFO();
|
| +
|
| +public:
|
| + static AudioWorkletGlobalScope* create(LocalFrame*, const KURL&, const String& userAgent, PassRefPtr<SecurityOrigin>, v8::Isolate*);
|
| + ~AudioWorkletGlobalScope() override;
|
| + void dispose() override;
|
| +
|
| + bool isAudioWorkletGlobalScope() const final { return true; }
|
| + void registerAudioWorkletProcessor(const String& name, const ScriptValue& ctor, ExceptionState&);
|
| +
|
| + AudioWorkletProcessorDefinition* findDefinition(const String& name);
|
| +
|
| + DECLARE_VIRTUAL_TRACE();
|
| +
|
| +private:
|
| + AudioWorkletGlobalScope(LocalFrame*, const KURL&, const String& userAgent, PassRefPtr<SecurityOrigin>, v8::Isolate*);
|
| +
|
| + typedef HeapHashMap<String, Member<AudioWorkletProcessorDefinition>> DefinitionMap;
|
| + DefinitionMap m_processorDefinitions;
|
| +};
|
| +
|
| +DEFINE_TYPE_CASTS(AudioWorkletGlobalScope, ExecutionContext, context, context->isAudioWorkletGlobalScope(), context.isAudioWorkletGlobalScope());
|
| +
|
| +} // namespace blink
|
| +
|
| +#endif // AudioWorkletGlobalScope_h
|
|
|