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