Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010, Google Inc. All rights reserved. | 2 * Copyright (C) 2010, 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 AudioProcessingEvent_h | 26 #ifndef AudioProcessingEvent_h |
| 27 #define AudioProcessingEvent_h | 27 #define AudioProcessingEvent_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/AudioProcessingEventInit.h" | |
| 32 | |
| 31 #include "wtf/PassRefPtr.h" | 33 #include "wtf/PassRefPtr.h" |
| 32 #include "wtf/RefPtr.h" | 34 #include "wtf/RefPtr.h" |
| 33 | 35 |
| 34 namespace blink { | 36 namespace blink { |
| 35 | 37 |
| 36 class AudioBuffer; | 38 class AudioBuffer; |
| 39 class AudioProcessingEventInit; | |
| 37 | 40 |
| 38 class AudioProcessingEvent final : public Event { | 41 class AudioProcessingEvent final : public Event { |
| 39 DEFINE_WRAPPERTYPEINFO(); | 42 DEFINE_WRAPPERTYPEINFO(); |
| 40 | 43 |
| 41 public: | 44 public: |
| 42 static AudioProcessingEvent* create(); | 45 static AudioProcessingEvent* create(); |
| 43 static AudioProcessingEvent* create(AudioBuffer* inputBuffer, | 46 static AudioProcessingEvent* create(AudioBuffer* inputBuffer, |
| 44 AudioBuffer* outputBuffer, | 47 AudioBuffer* outputBuffer, |
| 45 double playbackTime); | 48 double playbackTime); |
| 46 | 49 |
| 50 static AudioProcessingEvent* create(const AtomicString& eventType, | |
|
foolip
2016/11/15 19:53:33
s/eventType/type/ for consistency
Raymond Toy
2016/11/15 22:07:42
Done.
| |
| 51 const AudioProcessingEventInit&); | |
| 52 | |
| 47 ~AudioProcessingEvent() override; | 53 ~AudioProcessingEvent() override; |
| 48 | 54 |
| 49 AudioBuffer* inputBuffer() { return m_inputBuffer.get(); } | 55 AudioBuffer* inputBuffer() { return m_inputBuffer.get(); } |
| 50 AudioBuffer* outputBuffer() { return m_outputBuffer.get(); } | 56 AudioBuffer* outputBuffer() { return m_outputBuffer.get(); } |
| 51 double playbackTime() const { return m_playbackTime; } | 57 double playbackTime() const { return m_playbackTime; } |
| 52 | 58 |
| 53 const AtomicString& interfaceName() const override; | 59 const AtomicString& interfaceName() const override; |
| 54 | 60 |
| 55 DECLARE_VIRTUAL_TRACE(); | 61 DECLARE_VIRTUAL_TRACE(); |
| 56 | 62 |
| 57 private: | 63 private: |
| 58 AudioProcessingEvent(); | 64 AudioProcessingEvent(); |
| 59 AudioProcessingEvent(AudioBuffer* inputBuffer, | 65 AudioProcessingEvent(AudioBuffer* inputBuffer, |
| 60 AudioBuffer* outputBuffer, | 66 AudioBuffer* outputBuffer, |
| 61 double playbackTime); | 67 double playbackTime); |
| 68 AudioProcessingEvent(const AtomicString& type, | |
| 69 const AudioProcessingEventInit&); | |
| 62 | 70 |
| 63 Member<AudioBuffer> m_inputBuffer; | 71 Member<AudioBuffer> m_inputBuffer; |
| 64 Member<AudioBuffer> m_outputBuffer; | 72 Member<AudioBuffer> m_outputBuffer; |
| 65 double m_playbackTime; | 73 double m_playbackTime; |
| 66 }; | 74 }; |
| 67 | 75 |
| 68 } // namespace blink | 76 } // namespace blink |
| 69 | 77 |
| 70 #endif // AudioProcessingEvent_h | 78 #endif // AudioProcessingEvent_h |
| OLD | NEW |