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

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioParam.h

Issue 2707243006: [SharedArrayBuffer] Prevent SharedArrayBuffer being used in Web APIs (Closed)
Patch Set: update comment, add TODO Created 3 years, 8 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 11 matching lines...) Expand all
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 #ifndef AudioParam_h 29 #ifndef AudioParam_h
30 #define AudioParam_h 30 #define AudioParam_h
31 31
32 #include <sys/types.h>
32 #include "bindings/core/v8/ScriptWrappable.h" 33 #include "bindings/core/v8/ScriptWrappable.h"
33 #include "core/dom/DOMTypedArray.h" 34 #include "core/dom/DOMTypedArray.h"
35 #include "core/dom/NotShared.h"
34 #include "modules/webaudio/AudioParamTimeline.h" 36 #include "modules/webaudio/AudioParamTimeline.h"
35 #include "modules/webaudio/AudioSummingJunction.h" 37 #include "modules/webaudio/AudioSummingJunction.h"
36 #include "modules/webaudio/BaseAudioContext.h" 38 #include "modules/webaudio/BaseAudioContext.h"
37 #include "wtf/PassRefPtr.h" 39 #include "wtf/PassRefPtr.h"
38 #include "wtf/ThreadSafeRefCounted.h" 40 #include "wtf/ThreadSafeRefCounted.h"
39 #include "wtf/text/WTFString.h" 41 #include "wtf/text/WTFString.h"
40 #include <sys/types.h>
41 42
42 namespace blink { 43 namespace blink {
43 44
44 class AudioNodeOutput; 45 class AudioNodeOutput;
45 46
46 // Each AudioParam gets an identifier here. This is mostly for instrospection 47 // Each AudioParam gets an identifier here. This is mostly for instrospection
47 // if warnings or other messages need to be printed. It's useful to know what 48 // if warnings or other messages need to be printed. It's useful to know what
48 // the AudioParam represents. The name should include the node type and the 49 // the AudioParam represents. The name should include the node type and the
49 // name of the AudioParam. 50 // name of the AudioParam.
50 enum AudioParamType { 51 enum AudioParamType {
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 AudioParam* linearRampToValueAtTime(float value, 240 AudioParam* linearRampToValueAtTime(float value,
240 double time, 241 double time,
241 ExceptionState&); 242 ExceptionState&);
242 AudioParam* exponentialRampToValueAtTime(float value, 243 AudioParam* exponentialRampToValueAtTime(float value,
243 double time, 244 double time,
244 ExceptionState&); 245 ExceptionState&);
245 AudioParam* setTargetAtTime(float target, 246 AudioParam* setTargetAtTime(float target,
246 double time, 247 double time,
247 double time_constant, 248 double time_constant,
248 ExceptionState&); 249 ExceptionState&);
249 AudioParam* setValueCurveAtTime(DOMFloat32Array* curve, 250 AudioParam* setValueCurveAtTime(NotShared<DOMFloat32Array> curve,
250 double time, 251 double time,
251 double duration, 252 double duration,
252 ExceptionState&); 253 ExceptionState&);
253 AudioParam* cancelScheduledValues(double start_time, ExceptionState&); 254 AudioParam* cancelScheduledValues(double start_time, ExceptionState&);
254 AudioParam* cancelAndHoldAtTime(double start_time, ExceptionState&); 255 AudioParam* cancelAndHoldAtTime(double start_time, ExceptionState&);
255 256
256 private: 257 private:
257 AudioParam(BaseAudioContext&, 258 AudioParam(BaseAudioContext&,
258 AudioParamType, 259 AudioParamType,
259 double default_value, 260 double default_value,
260 float min, 261 float min,
261 float max); 262 float max);
262 263
263 void WarnIfOutsideRange(const String& param_methd, float value); 264 void WarnIfOutsideRange(const String& param_methd, float value);
264 265
265 RefPtr<AudioParamHandler> handler_; 266 RefPtr<AudioParamHandler> handler_;
266 Member<BaseAudioContext> context_; 267 Member<BaseAudioContext> context_;
267 }; 268 };
268 269
269 } // namespace blink 270 } // namespace blink
270 271
271 #endif // AudioParam_h 272 #endif // AudioParam_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698