| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Let the context dereference this AudioNode. | 198 // Let the context dereference this AudioNode. |
| 199 context()->notifyNodeFinishedProcessing(this); | 199 context()->notifyNodeFinishedProcessing(this); |
| 200 m_playbackState = FINISHED_STATE; | 200 m_playbackState = FINISHED_STATE; |
| 201 } | 201 } |
| 202 } | 202 } |
| 203 void AudioScheduledSourceNode::finish() | 203 void AudioScheduledSourceNode::finish() |
| 204 { | 204 { |
| 205 finishWithoutOnEnded(); | 205 finishWithoutOnEnded(); |
| 206 | 206 |
| 207 if (m_hasEndedListener && context()->executionContext()) { | 207 if (m_hasEndedListener && context()->executionContext()) { |
| 208 context()->executionContext()->postTask(FROM_HERE, createCrossThreadTask
(&AudioScheduledSourceNode::notifyEnded, this)); | 208 context()->executionContext()->postTask(createCrossThreadTask(&AudioSche
duledSourceNode::notifyEnded, this)); |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 void AudioScheduledSourceNode::notifyEnded() | 212 void AudioScheduledSourceNode::notifyEnded() |
| 213 { | 213 { |
| 214 dispatchEvent(Event::create(EventTypeNames::ended)); | 214 dispatchEvent(Event::create(EventTypeNames::ended)); |
| 215 } | 215 } |
| 216 | 216 |
| 217 } // namespace blink | 217 } // namespace blink |
| 218 | 218 |
| 219 #endif // ENABLE(WEB_AUDIO) | 219 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |