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

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

Issue 2727733002: Implement AudioWorkletProcessor interface (Closed)
Patch Set: Added AudioWorkletProcessor and AudioWorkletProcessorDefinition classes Created 3 years, 9 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef AudioWorkletProcessor_h
6 #define AudioWorkletProcessor_h
7
8 #include "bindings/core/v8/ScopedPersistent.h"
9 #include "platform/heap/Handle.h"
10 #include "v8/include/v8.h"
11
12 namespace blink {
13
14 class AudioBuffer;
15 class AudioWorkletGlobalScope;
16 class AudioWorkletProcessorDefinition;
17
18 // AudioWorkletProcessor class represents the active instance created from
19 // AudioWorkletProcessorDefinition. |AudioWorkletNodeHandler| invokes
20 // process() method in this object upon graph rendering.
21 class AudioWorkletProcessor
22 : public GarbageCollectedFinalized<AudioWorkletProcessor> {
23 public:
24 static AudioWorkletProcessor* create(const String& name,
25 AudioWorkletGlobalScope*);
26 virtual ~AudioWorkletProcessor();
27
28 // TODO: AudioWorkletHandler must serve
29 // - inputs: sequence<AudioBuffer>
30 // - outputs: sequence<AudioBuffer>
31 // - parameters: Object
32 bool process(AudioBuffer* inputBuffer, AudioBuffer* outputBuffer);
33
34 // TODO:
35 // Implement event handler and messaging features.
36
37 DECLARE_TRACE();
38
39 private:
40 AudioWorkletProcessor(AudioWorkletProcessorDefinition*);
haraken 2017/03/06 11:51:12 Add explicit.
hongchan 2017/03/06 20:06:12 Done.
41
42 Member<AudioWorkletProcessorDefinition> m_definition;
43 v8::Local<v8::Object> m_instance;
haraken 2017/03/06 11:51:12 You should not use v8::Local on a heap-allocated o
hongchan 2017/03/06 20:06:12 Done.
44 };
45
46 } // namespace blink
47
48 #endif // AudioWorkletProcessor_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698