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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioWorkletProcessorDefinition.h

Issue 2793593002: AudioWorklet prototype
Patch Set: Merge changes, AudioParam bug fix Created 3 years, 5 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 unified diff | Download patch
OLDNEW
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 20 matching lines...) Expand all
31 const String& name, 31 const String& name,
32 v8::Local<v8::Function> constructor, 32 v8::Local<v8::Function> constructor,
33 v8::Local<v8::Function> process); 33 v8::Local<v8::Function> process);
34 34
35 virtual ~AudioWorkletProcessorDefinition(); 35 virtual ~AudioWorkletProcessorDefinition();
36 36
37 const String& GetName() const { return name_; } 37 const String& GetName() const { return name_; }
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 HeapVector<AudioParamDescriptor>& GetAudioParamDescriptors() const;
41 const Vector<String> GetAudioParamDescriptorNames() const; 42 const Vector<String> GetAudioParamDescriptorNames() const;
42 const AudioParamDescriptor* GetAudioParamDescriptor(const String& key) const; 43 const AudioParamDescriptor* GetAudioParamDescriptor(const String& key) const;
43 44
44 DEFINE_INLINE_TRACE() { visitor->Trace(audio_param_descriptors_); }; 45 DEFINE_INLINE_TRACE() { visitor->Trace(audio_param_descriptors_); };
45 DECLARE_TRACE_WRAPPERS(); 46 DECLARE_TRACE_WRAPPERS();
46 47
47 private: 48 private:
48 AudioWorkletProcessorDefinition( 49 AudioWorkletProcessorDefinition(
49 v8::Isolate*, 50 v8::Isolate*,
50 const String& name, 51 const String& name,
51 v8::Local<v8::Function> constructor, 52 v8::Local<v8::Function> constructor,
52 v8::Local<v8::Function> process); 53 v8::Local<v8::Function> process);
53 54
54 const String name_; 55 const String name_;
55 56
56 // The definition is per global scope. The active instance of 57 // The definition is per global scope. The active instance of
57 // |AudioProcessorWorklet| should be passed into these to perform JS function. 58 // |AudioProcessorWorklet| should be passed into these to perform JS function.
58 TraceWrapperV8Reference<v8::Function> constructor_; 59 TraceWrapperV8Reference<v8::Function> constructor_;
59 TraceWrapperV8Reference<v8::Function> process_; 60 TraceWrapperV8Reference<v8::Function> process_;
60 61
62 // A container for AudioParamDescriptor objects.
61 HeapVector<AudioParamDescriptor> audio_param_descriptors_; 63 HeapVector<AudioParamDescriptor> audio_param_descriptors_;
62 }; 64 };
63 65
64 } // namespace blink 66 } // namespace blink
65 67
66 #endif // AudioWorkletProcessorDefinition_h 68 #endif // AudioWorkletProcessorDefinition_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698