| 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 { | 218 { |
| 219 ASSERT(isMainThread()); | 219 ASSERT(isMainThread()); |
| 220 if (node()) | 220 if (node()) |
| 221 node()->dispatchEvent(Event::create(EventTypeNames::ended)); | 221 node()->dispatchEvent(Event::create(EventTypeNames::ended)); |
| 222 } | 222 } |
| 223 | 223 |
| 224 // ---------------------------------------------------------------- | 224 // ---------------------------------------------------------------- |
| 225 | 225 |
| 226 AudioScheduledSourceNode::AudioScheduledSourceNode(AbstractAudioContext& context
) | 226 AudioScheduledSourceNode::AudioScheduledSourceNode(AbstractAudioContext& context
) |
| 227 : AudioSourceNode(context) | 227 : AudioSourceNode(context) |
| 228 , ActiveScriptWrappable(this) |
| 228 { | 229 { |
| 229 } | 230 } |
| 230 | 231 |
| 231 AudioScheduledSourceHandler& AudioScheduledSourceNode::audioScheduledSourceHandl
er() const | 232 AudioScheduledSourceHandler& AudioScheduledSourceNode::audioScheduledSourceHandl
er() const |
| 232 { | 233 { |
| 233 return static_cast<AudioScheduledSourceHandler&>(handler()); | 234 return static_cast<AudioScheduledSourceHandler&>(handler()); |
| 234 } | 235 } |
| 235 | 236 |
| 236 void AudioScheduledSourceNode::start(ExceptionState& exceptionState) | 237 void AudioScheduledSourceNode::start(ExceptionState& exceptionState) |
| 237 { | 238 { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 270 if (context()->isContextClosed()) | 271 if (context()->isContextClosed()) |
| 271 return false; | 272 return false; |
| 272 | 273 |
| 273 // If a node is scheduled or playing, do not collect the node prematurely | 274 // If a node is scheduled or playing, do not collect the node prematurely |
| 274 // even its reference is out of scope. Then fire onended event if assigned. | 275 // even its reference is out of scope. Then fire onended event if assigned. |
| 275 return audioScheduledSourceHandler().isPlayingOrScheduled(); | 276 return audioScheduledSourceHandler().isPlayingOrScheduled(); |
| 276 } | 277 } |
| 277 | 278 |
| 278 } // namespace blink | 279 } // namespace blink |
| 279 | 280 |
| OLD | NEW |