OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 AudioWorkletProcessorDefinition_h | 5 #ifndef AudioWorkletProcessorDefinition_h |
6 #define AudioWorkletProcessorDefinition_h | 6 #define AudioWorkletProcessorDefinition_h |
7 | 7 |
8 #include "modules/ModulesExport.h" | 8 #include "modules/ModulesExport.h" |
9 #include "modules/webaudio/AudioParamDescriptor.h" | 9 #include "modules/webaudio/AudioParamDescriptor.h" |
10 #include "platform/bindings/ScriptWrappable.h" | 10 #include "platform/bindings/ScriptWrappable.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 v8::Local<v8::Function> ConstructorLocal(v8::Isolate*); | 38 v8::Local<v8::Function> ConstructorLocal(v8::Isolate*); |
39 v8::Local<v8::Function> ProcessLocal(v8::Isolate*); | 39 v8::Local<v8::Function> ProcessLocal(v8::Isolate*); |
40 void SetAudioParamDescriptors(const HeapVector<AudioParamDescriptor>&); | 40 void SetAudioParamDescriptors(const HeapVector<AudioParamDescriptor>&); |
41 const Vector<String> GetAudioParamDescriptorNames() const; | 41 const Vector<String> GetAudioParamDescriptorNames() const; |
42 const AudioParamDescriptor* GetAudioParamDescriptor(const String& key) const; | 42 const AudioParamDescriptor* GetAudioParamDescriptor(const String& key) const; |
43 | 43 |
44 DEFINE_INLINE_TRACE() { visitor->Trace(audio_param_descriptors_); }; | 44 DEFINE_INLINE_TRACE() { visitor->Trace(audio_param_descriptors_); }; |
45 DECLARE_TRACE_WRAPPERS(); | 45 DECLARE_TRACE_WRAPPERS(); |
46 | 46 |
47 private: | 47 private: |
48 AudioWorkletProcessorDefinition( | 48 AudioWorkletProcessorDefinition(v8::Isolate*, |
49 v8::Isolate*, | 49 const String& name, |
50 const String& name, | 50 v8::Local<v8::Function> constructor, |
51 v8::Local<v8::Function> constructor, | 51 v8::Local<v8::Function> process); |
52 v8::Local<v8::Function> process); | |
53 | 52 |
54 const String name_; | 53 const String name_; |
55 | 54 |
56 // The definition is per global scope. The active instance of | 55 // The definition is per global scope. The active instance of |
57 // |AudioProcessorWorklet| should be passed into these to perform JS function. | 56 // |AudioProcessorWorklet| should be passed into these to perform JS function. |
58 TraceWrapperV8Reference<v8::Function> constructor_; | 57 TraceWrapperV8Reference<v8::Function> constructor_; |
59 TraceWrapperV8Reference<v8::Function> process_; | 58 TraceWrapperV8Reference<v8::Function> process_; |
60 | 59 |
61 HeapVector<AudioParamDescriptor> audio_param_descriptors_; | 60 HeapVector<AudioParamDescriptor> audio_param_descriptors_; |
62 }; | 61 }; |
63 | 62 |
64 } // namespace blink | 63 } // namespace blink |
65 | 64 |
66 #endif // AudioWorkletProcessorDefinition_h | 65 #endif // AudioWorkletProcessorDefinition_h |
OLD | NEW |