| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011, Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 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 10 matching lines...) Expand all Loading... |
| 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | 21 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY |
| 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | 22 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH |
| 23 * DAMAGE. | 23 * DAMAGE. |
| 24 */ | 24 */ |
| 25 | 25 |
| 26 #ifndef OfflineAudioCompletionEvent_h | 26 #ifndef OfflineAudioCompletionEvent_h |
| 27 #define OfflineAudioCompletionEvent_h | 27 #define OfflineAudioCompletionEvent_h |
| 28 | 28 |
| 29 #include "modules/EventModules.h" | 29 #include "modules/EventModules.h" |
| 30 #include "modules/webaudio/AudioBuffer.h" | 30 #include "modules/webaudio/AudioBuffer.h" |
| 31 #include "modules/webaudio/OfflineAudioCompletionEventInit.h" |
| 31 #include "wtf/PassRefPtr.h" | 32 #include "wtf/PassRefPtr.h" |
| 32 #include "wtf/RefPtr.h" | 33 #include "wtf/RefPtr.h" |
| 33 | 34 |
| 34 namespace blink { | 35 namespace blink { |
| 35 | 36 |
| 36 class AudioBuffer; | 37 class AudioBuffer; |
| 38 class OfflineAudioCompletionEventInit; |
| 37 | 39 |
| 38 class OfflineAudioCompletionEvent final : public Event { | 40 class OfflineAudioCompletionEvent final : public Event { |
| 39 DEFINE_WRAPPERTYPEINFO(); | 41 DEFINE_WRAPPERTYPEINFO(); |
| 40 | 42 |
| 41 public: | 43 public: |
| 42 static OfflineAudioCompletionEvent* create(); | 44 static OfflineAudioCompletionEvent* create(); |
| 43 static OfflineAudioCompletionEvent* create(AudioBuffer* renderedBuffer); | 45 static OfflineAudioCompletionEvent* create(AudioBuffer* renderedBuffer); |
| 46 static OfflineAudioCompletionEvent* create( |
| 47 const AtomicString& type, |
| 48 const OfflineAudioCompletionEventInit&); |
| 44 | 49 |
| 45 ~OfflineAudioCompletionEvent() override; | 50 ~OfflineAudioCompletionEvent() override; |
| 46 | 51 |
| 47 AudioBuffer* renderedBuffer() { return m_renderedBuffer.get(); } | 52 AudioBuffer* renderedBuffer() { return m_renderedBuffer.get(); } |
| 48 | 53 |
| 49 const AtomicString& interfaceName() const override; | 54 const AtomicString& interfaceName() const override; |
| 50 | 55 |
| 51 DECLARE_VIRTUAL_TRACE(); | 56 DECLARE_VIRTUAL_TRACE(); |
| 52 | 57 |
| 53 private: | 58 private: |
| 54 OfflineAudioCompletionEvent(); | 59 OfflineAudioCompletionEvent(); |
| 55 explicit OfflineAudioCompletionEvent(AudioBuffer* renderedBuffer); | 60 explicit OfflineAudioCompletionEvent(AudioBuffer* renderedBuffer); |
| 61 explicit OfflineAudioCompletionEvent(const AtomicString& type, |
| 62 const OfflineAudioCompletionEventInit&); |
| 56 | 63 |
| 57 Member<AudioBuffer> m_renderedBuffer; | 64 Member<AudioBuffer> m_renderedBuffer; |
| 58 }; | 65 }; |
| 59 | 66 |
| 60 } // namespace blink | 67 } // namespace blink |
| 61 | 68 |
| 62 #endif // OfflineAudioCompletionEvent_h | 69 #endif // OfflineAudioCompletionEvent_h |
| OLD | NEW |