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

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

Issue 2727733002: Implement AudioWorkletProcessor interface (Closed)
Patch Set: Refactored AudioWorkletGlobalScope to centralize V8 operation 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 return new AudioWorkletProcessorDefinition(isolate, name, constructor,
15 process);
16 }
17
18 AudioWorkletProcessorDefinition::AudioWorkletProcessorDefinition(
19 v8::Isolate* isolate,
20 const String& name,
21 v8::Local<v8::Function> constructor,
22 v8::Local<v8::Function> process)
23 : m_name(name),
24 m_constructor(isolate, constructor),
25 m_process(isolate, process) {}
26
27 AudioWorkletProcessorDefinition::~AudioWorkletProcessorDefinition() {}
28
29 v8::Local<v8::Function> AudioWorkletProcessorDefinition::constructorLocal(
30 v8::Isolate* isolate) {
31 return m_constructor.newLocal(isolate);
32 }
33
34 v8::Local<v8::Function> AudioWorkletProcessorDefinition::processLocal(
35 v8::Isolate* isolate) {
36 return m_process.newLocal(isolate);
37 }
38
39 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698