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

Unified Diff: third_party/WebKit/Source/modules/webaudio/AudioNode.cpp

Issue 2102133002: Add constructors for WebAudio nodes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and prefix use counter names with WebAudio Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
index d627cb86b4463237569e647c855e2bceadce2185..1d49d73c04288904d82bc72d2dbacaea4646bcfb 100644
--- a/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AudioNode.cpp
@@ -27,6 +27,7 @@
#include "core/dom/ExceptionCode.h"
#include "core/inspector/InstanceCounters.h"
#include "modules/webaudio/AudioNodeInput.h"
+#include "modules/webaudio/AudioNodeOptions.h"
#include "modules/webaudio/AudioNodeOutput.h"
#include "modules/webaudio/AudioParam.h"
#include "modules/webaudio/BaseAudioContext.h"
@@ -592,6 +593,18 @@ DEFINE_TRACE(AudioNode)
EventTargetWithInlineData::trace(visitor);
}
+void AudioNode::handleChannelOptions(const AudioNodeOptions& options, ExceptionState& exceptionState)
+{
+ DCHECK(isMainThread());
+
+ if (options.hasChannelCount())
+ setChannelCount(options.channelCount(), exceptionState);
+ if (options.hasChannelCountMode())
+ setChannelCountMode(options.channelCountMode(), exceptionState);
+ if (options.hasChannelInterpretation())
+ setChannelInterpretation(options.channelInterpretation(), exceptionState);
+}
+
BaseAudioContext* AudioNode::context() const
{
return m_context;
« no previous file with comments | « third_party/WebKit/Source/modules/webaudio/AudioNode.h ('k') | third_party/WebKit/Source/modules/webaudio/AudioNode.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698