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

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

Issue 2940933003: DO NOT SUBMIT results of new clang-format (Closed)
Patch Set: Created 3 years, 6 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 #include "modules/webaudio/AudioWorkletProcessorDefinition.h" 5 #include "modules/webaudio/AudioWorkletProcessorDefinition.h"
6 6
7 namespace blink { 7 namespace blink {
8 8
9 AudioWorkletProcessorDefinition* AudioWorkletProcessorDefinition::Create( 9 AudioWorkletProcessorDefinition* AudioWorkletProcessorDefinition::Create(
10 v8::Isolate* isolate, 10 v8::Isolate* isolate,
(...skipping 27 matching lines...) Expand all
38 DCHECK(!IsMainThread()); 38 DCHECK(!IsMainThread());
39 return process_.NewLocal(isolate); 39 return process_.NewLocal(isolate);
40 } 40 }
41 41
42 void AudioWorkletProcessorDefinition::SetAudioParamDescriptors( 42 void AudioWorkletProcessorDefinition::SetAudioParamDescriptors(
43 const HeapVector<AudioParamDescriptor>& descriptors) { 43 const HeapVector<AudioParamDescriptor>& descriptors) {
44 audio_param_descriptors_ = descriptors; 44 audio_param_descriptors_ = descriptors;
45 } 45 }
46 46
47 const Vector<String> 47 const Vector<String>
48 AudioWorkletProcessorDefinition::GetAudioParamDescriptorNames() const { 48 AudioWorkletProcessorDefinition::GetAudioParamDescriptorNames() const {
49 Vector<String> names; 49 Vector<String> names;
50 for (const auto& descriptor : audio_param_descriptors_) { 50 for (const auto& descriptor : audio_param_descriptors_) {
51 names.push_back(descriptor.name()); 51 names.push_back(descriptor.name());
52 } 52 }
53 return names; 53 return names;
54 } 54 }
55 55
56 const AudioParamDescriptor* 56 const AudioParamDescriptor*
57 AudioWorkletProcessorDefinition::GetAudioParamDescriptor ( 57 AudioWorkletProcessorDefinition::GetAudioParamDescriptor(
58 const String& key) const { 58 const String& key) const {
59 for (const auto& descriptor : audio_param_descriptors_) { 59 for (const auto& descriptor : audio_param_descriptors_) {
60 if (descriptor.name() == key) 60 if (descriptor.name() == key)
61 return &descriptor; 61 return &descriptor;
62 } 62 }
63 return nullptr; 63 return nullptr;
64 } 64 }
65 65
66 DEFINE_TRACE_WRAPPERS(AudioWorkletProcessorDefinition) { 66 DEFINE_TRACE_WRAPPERS(AudioWorkletProcessorDefinition) {
67 visitor->TraceWrappers(constructor_.Cast<v8::Value>()); 67 visitor->TraceWrappers(constructor_.Cast<v8::Value>());
68 visitor->TraceWrappers(process_.Cast<v8::Value>()); 68 visitor->TraceWrappers(process_.Cast<v8::Value>());
69 } 69 }
70 70
71 } // namespace blink 71 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698