Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(948)

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h

Issue 1960533003: [DO NOT SUBMIT] AudioWorklet FS1: importing scripts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698