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

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

Issue 1911133002: Remove connection from AudioParamHandler to AudioContext. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 17 matching lines...) Expand all
28 #include "modules/webaudio/AudioNodeOutput.h" 28 #include "modules/webaudio/AudioNodeOutput.h"
29 #include "platform/FloatConversion.h" 29 #include "platform/FloatConversion.h"
30 #include "platform/audio/AudioUtilities.h" 30 #include "platform/audio/AudioUtilities.h"
31 #include "wtf/MathExtras.h" 31 #include "wtf/MathExtras.h"
32 32
33 namespace blink { 33 namespace blink {
34 34
35 const double AudioParamHandler::DefaultSmoothingConstant = 0.05; 35 const double AudioParamHandler::DefaultSmoothingConstant = 0.05;
36 const double AudioParamHandler::SnapThreshold = 0.001; 36 const double AudioParamHandler::SnapThreshold = 0.001;
37 37
38 AbstractAudioContext* AudioParamHandler::context() const 38 AudioDestinationHandler* AudioParamHandler::context() const
39 { 39 {
40 // TODO(tkent): We can remove this dangerous function by removing 40 return &m_destination;
41 // AbstractAudioContext dependency from AudioParamTimeline.
42 ASSERT_WITH_SECURITY_IMPLICATION(deferredTaskHandler().isAudioThread());
43 return m_context;
44 } 41 }
45 42
46 float AudioParamHandler::value() 43 float AudioParamHandler::value()
47 { 44 {
48 // Update value for timeline. 45 // Update value for timeline.
49 float v = intrinsicValue(); 46 float v = intrinsicValue();
50 if (deferredTaskHandler().isAudioThread()) { 47 if (deferredTaskHandler().isAudioThread()) {
51 bool hasValue; 48 bool hasValue;
52 float timelineValue = m_timeline.valueForContextTime(context(), v, hasVa lue); 49 float timelineValue = m_timeline.valueForContextTime(context(), v, hasVa lue);
53 50
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 } 258 }
262 259
263 AudioParam* AudioParam::cancelScheduledValues(double startTime, ExceptionState& exceptionState) 260 AudioParam* AudioParam::cancelScheduledValues(double startTime, ExceptionState& exceptionState)
264 { 261 {
265 handler().timeline().cancelScheduledValues(startTime, exceptionState); 262 handler().timeline().cancelScheduledValues(startTime, exceptionState);
266 return this; 263 return this;
267 } 264 }
268 265
269 } // namespace blink 266 } // namespace blink
270 267
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698