OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012, Google Inc. All rights reserved. | 2 * Copyright (C) 2012, 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 void AudioScheduledSourceHandler::notifyEnded() { | 231 void AudioScheduledSourceHandler::notifyEnded() { |
232 DCHECK(isMainThread()); | 232 DCHECK(isMainThread()); |
233 if (node()) | 233 if (node()) |
234 node()->dispatchEvent(Event::create(EventTypeNames::ended)); | 234 node()->dispatchEvent(Event::create(EventTypeNames::ended)); |
235 } | 235 } |
236 | 236 |
237 // ---------------------------------------------------------------- | 237 // ---------------------------------------------------------------- |
238 | 238 |
239 AudioScheduledSourceNode::AudioScheduledSourceNode(BaseAudioContext& context) | 239 AudioScheduledSourceNode::AudioScheduledSourceNode(BaseAudioContext& context) |
240 : AudioSourceNode(context) {} | 240 : AudioNode(context) {} |
241 | 241 |
242 AudioScheduledSourceHandler& | 242 AudioScheduledSourceHandler& |
243 AudioScheduledSourceNode::audioScheduledSourceHandler() const { | 243 AudioScheduledSourceNode::audioScheduledSourceHandler() const { |
244 return static_cast<AudioScheduledSourceHandler&>(handler()); | 244 return static_cast<AudioScheduledSourceHandler&>(handler()); |
245 } | 245 } |
246 | 246 |
247 void AudioScheduledSourceNode::start(ExceptionState& exceptionState) { | 247 void AudioScheduledSourceNode::start(ExceptionState& exceptionState) { |
248 start(0, exceptionState); | 248 start(0, exceptionState); |
249 } | 249 } |
250 | 250 |
(...skipping 24 matching lines...) Expand all Loading... |
275 // playback state if the context is closed. | 275 // playback state if the context is closed. |
276 if (context()->isContextClosed()) | 276 if (context()->isContextClosed()) |
277 return false; | 277 return false; |
278 | 278 |
279 // If a node is scheduled or playing, do not collect the node prematurely | 279 // If a node is scheduled or playing, do not collect the node prematurely |
280 // even its reference is out of scope. Then fire onended event if assigned. | 280 // even its reference is out of scope. Then fire onended event if assigned. |
281 return audioScheduledSourceHandler().isPlayingOrScheduled(); | 281 return audioScheduledSourceHandler().isPlayingOrScheduled(); |
282 } | 282 } |
283 | 283 |
284 } // namespace blink | 284 } // namespace blink |
OLD | NEW |