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

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

Issue 2621923003: Remove AudioSourceNode class (Closed)
Patch Set: Rebase Created 3 years, 11 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) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 214
215 void MediaElementAudioSourceHandler::unlock() { 215 void MediaElementAudioSourceHandler::unlock() {
216 m_processLock.unlock(); 216 m_processLock.unlock();
217 } 217 }
218 218
219 // ---------------------------------------------------------------- 219 // ----------------------------------------------------------------
220 220
221 MediaElementAudioSourceNode::MediaElementAudioSourceNode( 221 MediaElementAudioSourceNode::MediaElementAudioSourceNode(
222 BaseAudioContext& context, 222 BaseAudioContext& context,
223 HTMLMediaElement& mediaElement) 223 HTMLMediaElement& mediaElement)
224 : AudioSourceNode(context) { 224 : AudioNode(context) {
225 setHandler(MediaElementAudioSourceHandler::create(*this, mediaElement)); 225 setHandler(MediaElementAudioSourceHandler::create(*this, mediaElement));
226 } 226 }
227 227
228 MediaElementAudioSourceNode* MediaElementAudioSourceNode::create( 228 MediaElementAudioSourceNode* MediaElementAudioSourceNode::create(
229 BaseAudioContext& context, 229 BaseAudioContext& context,
230 HTMLMediaElement& mediaElement, 230 HTMLMediaElement& mediaElement,
231 ExceptionState& exceptionState) { 231 ExceptionState& exceptionState) {
232 DCHECK(isMainThread()); 232 DCHECK(isMainThread());
233 233
234 if (context.isContextClosed()) { 234 if (context.isContextClosed()) {
(...skipping 30 matching lines...) Expand all
265 exceptionState.throwDOMException(NotFoundError, 265 exceptionState.throwDOMException(NotFoundError,
266 "mediaElement member is required."); 266 "mediaElement member is required.");
267 return nullptr; 267 return nullptr;
268 } 268 }
269 269
270 return create(*context, *options.mediaElement(), exceptionState); 270 return create(*context, *options.mediaElement(), exceptionState);
271 } 271 }
272 272
273 DEFINE_TRACE(MediaElementAudioSourceNode) { 273 DEFINE_TRACE(MediaElementAudioSourceNode) {
274 AudioSourceProviderClient::trace(visitor); 274 AudioSourceProviderClient::trace(visitor);
275 AudioSourceNode::trace(visitor); 275 AudioNode::trace(visitor);
276 } 276 }
277 277
278 MediaElementAudioSourceHandler& 278 MediaElementAudioSourceHandler&
279 MediaElementAudioSourceNode::mediaElementAudioSourceHandler() const { 279 MediaElementAudioSourceNode::mediaElementAudioSourceHandler() const {
280 return static_cast<MediaElementAudioSourceHandler&>(handler()); 280 return static_cast<MediaElementAudioSourceHandler&>(handler());
281 } 281 }
282 282
283 HTMLMediaElement* MediaElementAudioSourceNode::mediaElement() const { 283 HTMLMediaElement* MediaElementAudioSourceNode::mediaElement() const {
284 return mediaElementAudioSourceHandler().mediaElement(); 284 return mediaElementAudioSourceHandler().mediaElement();
285 } 285 }
286 286
287 void MediaElementAudioSourceNode::setFormat(size_t numberOfChannels, 287 void MediaElementAudioSourceNode::setFormat(size_t numberOfChannels,
288 float sampleRate) { 288 float sampleRate) {
289 mediaElementAudioSourceHandler().setFormat(numberOfChannels, sampleRate); 289 mediaElementAudioSourceHandler().setFormat(numberOfChannels, sampleRate);
290 } 290 }
291 291
292 void MediaElementAudioSourceNode::onCurrentSrcChanged(const KURL& currentSrc) { 292 void MediaElementAudioSourceNode::onCurrentSrcChanged(const KURL& currentSrc) {
293 mediaElementAudioSourceHandler().onCurrentSrcChanged(currentSrc); 293 mediaElementAudioSourceHandler().onCurrentSrcChanged(currentSrc);
294 } 294 }
295 295
296 void MediaElementAudioSourceNode::lock() { 296 void MediaElementAudioSourceNode::lock() {
297 mediaElementAudioSourceHandler().lock(); 297 mediaElementAudioSourceHandler().lock();
298 } 298 }
299 299
300 void MediaElementAudioSourceNode::unlock() { 300 void MediaElementAudioSourceNode::unlock() {
301 mediaElementAudioSourceHandler().unlock(); 301 mediaElementAudioSourceHandler().unlock();
302 } 302 }
303 303
304 } // namespace blink 304 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698