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

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

Issue 2727733002: Implement AudioWorkletProcessor interface (Closed)
Patch Set: Added AudioWorkletProcessor and AudioWorkletProcessorDefinition classes Created 3 years, 10 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
index 590a3a3300b7a5496d6a87b6782cb93b1cc04045..f630d016364e51c469949d2a3e86652012ffcd85 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
+++ b/third_party/WebKit/Source/modules/webaudio/AudioWorkletGlobalScope.h
@@ -5,11 +5,18 @@
#ifndef AudioWorkletGlobalScope_h
#define AudioWorkletGlobalScope_h
+#include "bindings/core/v8/ScriptValue.h"
+#include "core/dom/ExecutionContext.h"
#include "core/workers/ThreadedWorkletGlobalScope.h"
+#include "modules/ModulesExport.h"
namespace blink {
-class AudioWorkletGlobalScope final : public ThreadedWorkletGlobalScope {
+class ExceptionState;
+class AudioWorkletProcessorDefinition;
+
+class MODULES_EXPORT AudioWorkletGlobalScope final
+ : public ThreadedWorkletGlobalScope {
DEFINE_WRAPPERTYPEINFO();
public:
@@ -19,6 +26,14 @@ class AudioWorkletGlobalScope final : public ThreadedWorkletGlobalScope {
v8::Isolate*,
WorkerThread*);
~AudioWorkletGlobalScope() override;
+ void dispose() final;
+ bool isAudioWorkletGlobalScope() const final { return true; }
+ AudioWorkletProcessorDefinition* findDefinition(const String& name);
+ void registerProcessor(const String& name,
+ const ScriptValue& ctor,
haraken 2017/03/06 11:51:11 constructor
hongchan 2017/03/06 20:06:12 Done.
+ ExceptionState&);
+
+ DECLARE_TRACE();
private:
AudioWorkletGlobalScope(const KURL&,
@@ -26,6 +41,10 @@ class AudioWorkletGlobalScope final : public ThreadedWorkletGlobalScope {
PassRefPtr<SecurityOrigin>,
v8::Isolate*,
WorkerThread*);
+
+ typedef HeapHashMap<String, Member<AudioWorkletProcessorDefinition>>
+ ProcessorDefinitionMap;
+ ProcessorDefinitionMap m_processorDefinitionMap;
};
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698