| 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 context()->notifySourceNodeFinishedProcessing(this); | 206 context()->notifySourceNodeFinishedProcessing(this); |
| 207 setPlaybackState(FINISHED_STATE); | 207 setPlaybackState(FINISHED_STATE); |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 | 210 |
| 211 void AudioScheduledSourceHandler::finish() | 211 void AudioScheduledSourceHandler::finish() |
| 212 { | 212 { |
| 213 finishWithoutOnEnded(); | 213 finishWithoutOnEnded(); |
| 214 | 214 |
| 215 if (context()->executionContext()) { | 215 if (context()->executionContext()) { |
| 216 context()->executionContext()->postTask(FROM_HERE, createCrossThreadTask
(&AudioScheduledSourceHandler::notifyEnded, PassRefPtr<AudioScheduledSourceHandl
er>(this))); | 216 context()->executionContext()->postTask(BLINK_FROM_HERE, createCrossThre
adTask(&AudioScheduledSourceHandler::notifyEnded, PassRefPtr<AudioScheduledSourc
eHandler>(this))); |
| 217 } | 217 } |
| 218 } | 218 } |
| 219 | 219 |
| 220 void AudioScheduledSourceHandler::notifyEnded() | 220 void AudioScheduledSourceHandler::notifyEnded() |
| 221 { | 221 { |
| 222 ASSERT(isMainThread()); | 222 ASSERT(isMainThread()); |
| 223 if (node()) | 223 if (node()) |
| 224 node()->dispatchEvent(Event::create(EventTypeNames::ended)); | 224 node()->dispatchEvent(Event::create(EventTypeNames::ended)); |
| 225 } | 225 } |
| 226 | 226 |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 } | 262 } |
| 263 | 263 |
| 264 void AudioScheduledSourceNode::setOnended(PassRefPtrWillBeRawPtr<EventListener>
listener) | 264 void AudioScheduledSourceNode::setOnended(PassRefPtrWillBeRawPtr<EventListener>
listener) |
| 265 { | 265 { |
| 266 setAttributeEventListener(EventTypeNames::ended, listener); | 266 setAttributeEventListener(EventTypeNames::ended, listener); |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace blink | 269 } // namespace blink |
| 270 | 270 |
| 271 #endif // ENABLE(WEB_AUDIO) | 271 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |