Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef AudioWorkletGlobalScope_h | 5 #ifndef AudioWorkletGlobalScope_h |
| 6 #define AudioWorkletGlobalScope_h | 6 #define AudioWorkletGlobalScope_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/ScriptValue.h" | |
| 9 #include "core/dom/ExecutionContext.h" | |
| 8 #include "core/workers/ThreadedWorkletGlobalScope.h" | 10 #include "core/workers/ThreadedWorkletGlobalScope.h" |
| 11 #include "modules/ModulesExport.h" | |
| 9 | 12 |
| 10 namespace blink { | 13 namespace blink { |
| 11 | 14 |
| 12 class AudioWorkletGlobalScope final : public ThreadedWorkletGlobalScope { | 15 class ExceptionState; |
| 16 class AudioWorkletProcessorDefinition; | |
| 17 | |
| 18 class MODULES_EXPORT AudioWorkletGlobalScope final | |
| 19 : public ThreadedWorkletGlobalScope { | |
| 13 DEFINE_WRAPPERTYPEINFO(); | 20 DEFINE_WRAPPERTYPEINFO(); |
| 14 | 21 |
| 15 public: | 22 public: |
| 16 static AudioWorkletGlobalScope* create(const KURL&, | 23 static AudioWorkletGlobalScope* create(const KURL&, |
| 17 const String& userAgent, | 24 const String& userAgent, |
| 18 PassRefPtr<SecurityOrigin>, | 25 PassRefPtr<SecurityOrigin>, |
| 19 v8::Isolate*, | 26 v8::Isolate*, |
| 20 WorkerThread*); | 27 WorkerThread*); |
| 21 ~AudioWorkletGlobalScope() override; | 28 ~AudioWorkletGlobalScope() override; |
| 29 void dispose() final; | |
| 30 bool isAudioWorkletGlobalScope() const final { return true; } | |
| 31 AudioWorkletProcessorDefinition* findDefinition(const String& name); | |
| 32 void registerProcessor(const String& name, | |
| 33 const ScriptValue& ctor, | |
|
haraken
2017/03/06 11:51:11
constructor
hongchan
2017/03/06 20:06:12
Done.
| |
| 34 ExceptionState&); | |
| 35 | |
| 36 DECLARE_TRACE(); | |
| 22 | 37 |
| 23 private: | 38 private: |
| 24 AudioWorkletGlobalScope(const KURL&, | 39 AudioWorkletGlobalScope(const KURL&, |
| 25 const String& userAgent, | 40 const String& userAgent, |
| 26 PassRefPtr<SecurityOrigin>, | 41 PassRefPtr<SecurityOrigin>, |
| 27 v8::Isolate*, | 42 v8::Isolate*, |
| 28 WorkerThread*); | 43 WorkerThread*); |
| 44 | |
| 45 typedef HeapHashMap<String, Member<AudioWorkletProcessorDefinition>> | |
| 46 ProcessorDefinitionMap; | |
| 47 ProcessorDefinitionMap m_processorDefinitionMap; | |
| 29 }; | 48 }; |
| 30 | 49 |
| 31 } // namespace blink | 50 } // namespace blink |
| 32 | 51 |
| 33 #endif // AudioWorkletGlobalScope_h | 52 #endif // AudioWorkletGlobalScope_h |
| OLD | NEW |