| 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 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #include "bindings/core/v8/ExceptionState.h" | 31 #include "bindings/core/v8/ExceptionState.h" |
| 32 #include "core/dom/CrossThreadTask.h" | 32 #include "core/dom/CrossThreadTask.h" |
| 33 #include "core/dom/ExceptionCode.h" | 33 #include "core/dom/ExceptionCode.h" |
| 34 #include "modules/EventModules.h" | 34 #include "modules/EventModules.h" |
| 35 #include "modules/webaudio/AudioContext.h" | 35 #include "modules/webaudio/AudioContext.h" |
| 36 #include "platform/audio/AudioUtilities.h" | 36 #include "platform/audio/AudioUtilities.h" |
| 37 #include "wtf/MathExtras.h" | 37 #include "wtf/MathExtras.h" |
| 38 #include <algorithm> | 38 #include <algorithm> |
| 39 | 39 |
| 40 namespace WebCore { | 40 namespace blink { |
| 41 | 41 |
| 42 #if !ENABLE(OILPAN) | 42 #if !ENABLE(OILPAN) |
| 43 // We need a dedicated specialization for AudioScheduledSourceNode because it | 43 // We need a dedicated specialization for AudioScheduledSourceNode because it |
| 44 // doesn't inherit from RefCounted. | 44 // doesn't inherit from RefCounted. |
| 45 template<> struct CrossThreadCopierBase<false, false, false, PassRefPtr<AudioSch
eduledSourceNode> > : public CrossThreadCopierPassThrough<PassRefPtr<AudioSchedu
ledSourceNode> > { | 45 template<> struct CrossThreadCopierBase<false, false, false, PassRefPtr<AudioSch
eduledSourceNode> > : public CrossThreadCopierPassThrough<PassRefPtr<AudioSchedu
ledSourceNode> > { |
| 46 }; | 46 }; |
| 47 #endif | 47 #endif |
| 48 | 48 |
| 49 const double AudioScheduledSourceNode::UnknownTime = -1; | 49 const double AudioScheduledSourceNode::UnknownTime = -1; |
| 50 | 50 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 if (m_hasEndedListener && context()->executionContext()) { | 190 if (m_hasEndedListener && context()->executionContext()) { |
| 191 context()->executionContext()->postTask(createCrossThreadTask(&AudioSche
duledSourceNode::notifyEnded, PassRefPtrWillBeRawPtr<AudioScheduledSourceNode>(t
his))); | 191 context()->executionContext()->postTask(createCrossThreadTask(&AudioSche
duledSourceNode::notifyEnded, PassRefPtrWillBeRawPtr<AudioScheduledSourceNode>(t
his))); |
| 192 } | 192 } |
| 193 } | 193 } |
| 194 | 194 |
| 195 void AudioScheduledSourceNode::notifyEnded() | 195 void AudioScheduledSourceNode::notifyEnded() |
| 196 { | 196 { |
| 197 dispatchEvent(Event::create(EventTypeNames::ended)); | 197 dispatchEvent(Event::create(EventTypeNames::ended)); |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace WebCore | 200 } // namespace blink |
| 201 | 201 |
| 202 #endif // ENABLE(WEB_AUDIO) | 202 #endif // ENABLE(WEB_AUDIO) |
| OLD | NEW |