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

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

Issue 2727733002: Implement AudioWorkletProcessor interface (Closed)
Patch Set: Addressing feedback from rtoy@ 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 #include "modules/webaudio/AudioWorkletProcessorDefinition.h"
6
7 namespace blink {
8
9 AudioWorkletProcessorDefinition* AudioWorkletProcessorDefinition::create(
10 v8::Isolate* isolate,
11 const String& name,
12 v8::Local<v8::Function> constructor,
13 v8::Local<v8::Function> process) {
14 DCHECK(!isMainThread());
15 return new AudioWorkletProcessorDefinition(isolate, name, constructor,
16 process);
17 }
18
19 AudioWorkletProcessorDefinition::AudioWorkletProcessorDefinition(
20 v8::Isolate* isolate,
21 const String& name,
22 v8::Local<v8::Function> constructor,
23 v8::Local<v8::Function> process)
24 : m_name(name),
25 m_constructor(isolate, constructor),
26 m_process(isolate, process) {}
27
28 AudioWorkletProcessorDefinition::~AudioWorkletProcessorDefinition() {}
29
30 v8::Local<v8::Function> AudioWorkletProcessorDefinition::constructorLocal(
31 v8::Isolate* isolate) {
32 DCHECK(!isMainThread());
33 return m_constructor.newLocal(isolate);
34 }
35
36 v8::Local<v8::Function> AudioWorkletProcessorDefinition::processLocal(
37 v8::Isolate* isolate) {
38 DCHECK(!isMainThread());
39 return m_process.newLocal(isolate);
40 }
41
42 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698