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

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

Issue 1948653003: Add PeriodicWaveConstraints dictionary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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/AbstractAudioContext.cpp
diff --git a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
index 9bff5cd77cca1b36ab37427efbce45957e43f231..d7be1dce34b9e3836d236978d31a710da746303a 100644
--- a/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
+++ b/third_party/WebKit/Source/modules/webaudio/AbstractAudioContext.cpp
@@ -60,6 +60,7 @@
#include "modules/webaudio/OscillatorNode.h"
#include "modules/webaudio/PannerNode.h"
#include "modules/webaudio/PeriodicWave.h"
+#include "modules/webaudio/PeriodicWaveConstraints.h"
#include "modules/webaudio/ScriptProcessorNode.h"
#include "modules/webaudio/StereoPannerNode.h"
#include "modules/webaudio/WaveShaperNode.h"
@@ -578,7 +579,7 @@ PeriodicWave* AbstractAudioContext::createPeriodicWave(DOMFloat32Array* real, DO
return PeriodicWave::create(sampleRate(), real, imag, false);
}
-PeriodicWave* AbstractAudioContext::createPeriodicWave(DOMFloat32Array* real, DOMFloat32Array* imag, const Dictionary& options, ExceptionState& exceptionState)
+PeriodicWave* AbstractAudioContext::createPeriodicWave(DOMFloat32Array* real, DOMFloat32Array* imag, const PeriodicWaveConstraints& options, ExceptionState& exceptionState)
{
ASSERT(isMainThread());
@@ -597,7 +598,8 @@ PeriodicWave* AbstractAudioContext::createPeriodicWave(DOMFloat32Array* real, DO
}
bool isNormalizationDisabled = false;
- DictionaryHelper::getWithUndefinedOrNullCheck(options, "disableNormalization", isNormalizationDisabled);
+ if (options.hasDisableNormalization())
Rick Byers 2016/05/05 14:13:39 nit: since this is a required dictionary member (w
Raymond Toy 2016/05/05 17:11:46 Done. Removed the default value from the IDL was
+ isNormalizationDisabled = options.disableNormalization();
return PeriodicWave::create(sampleRate(), real, imag, isNormalizationDisabled);
}

Powered by Google App Engine
This is Rietveld 408576698