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

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

Issue 2103043007: Rename AbstractAudioContext to BaseAudioContext (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use ASSERT(isGraphOwner()) instead of DCHECK Created 4 years, 5 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 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 m_analyser.setSmoothingTimeConstant(k); 106 m_analyser.setSmoothingTimeConstant(k);
107 } else { 107 } else {
108 exceptionState.throwDOMException( 108 exceptionState.throwDOMException(
109 IndexSizeError, 109 IndexSizeError,
110 ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0, Exce ptionMessages::InclusiveBound, 1.0, ExceptionMessages::InclusiveBound)); 110 ExceptionMessages::indexOutsideRange("smoothing value", k, 0.0, Exce ptionMessages::InclusiveBound, 1.0, ExceptionMessages::InclusiveBound));
111 } 111 }
112 } 112 }
113 113
114 // ---------------------------------------------------------------- 114 // ----------------------------------------------------------------
115 115
116 AnalyserNode::AnalyserNode(AbstractAudioContext& context) 116 AnalyserNode::AnalyserNode(BaseAudioContext& context)
117 : AudioBasicInspectorNode(context) 117 : AudioBasicInspectorNode(context)
118 { 118 {
119 setHandler(AnalyserHandler::create(*this, context.sampleRate())); 119 setHandler(AnalyserHandler::create(*this, context.sampleRate()));
120 } 120 }
121 121
122 AnalyserNode* AnalyserNode::create(AbstractAudioContext& context, ExceptionState & exceptionState) 122 AnalyserNode* AnalyserNode::create(BaseAudioContext& context, ExceptionState& ex ceptionState)
123 { 123 {
124 DCHECK(isMainThread()); 124 DCHECK(isMainThread());
125 125
126 if (context.isContextClosed()) { 126 if (context.isContextClosed()) {
127 context.throwExceptionForClosedState(exceptionState); 127 context.throwExceptionForClosedState(exceptionState);
128 return nullptr; 128 return nullptr;
129 } 129 }
130 130
131 return new AnalyserNode(context); 131 return new AnalyserNode(context);
132 } 132 }
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 analyserHandler().getFloatTimeDomainData(array); 196 analyserHandler().getFloatTimeDomainData(array);
197 } 197 }
198 198
199 void AnalyserNode::getByteTimeDomainData(DOMUint8Array* array) 199 void AnalyserNode::getByteTimeDomainData(DOMUint8Array* array)
200 { 200 {
201 analyserHandler().getByteTimeDomainData(array); 201 analyserHandler().getByteTimeDomainData(array);
202 } 202 }
203 203
204 } // namespace blink 204 } // namespace blink
205 205
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698