Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(449)

Side by Side Diff: third_party/WebKit/Source/modules/webaudio/AudioProcessingEvent.h

Issue 2491653002: Add constructors for WebAudio events (Closed)
Patch Set: Remove unnecessary blank lines Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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"
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 AudioProcessingEventInit;
37 39
38 class AudioProcessingEvent final : public Event { 40 class AudioProcessingEvent final : public Event {
39 DEFINE_WRAPPERTYPEINFO(); 41 DEFINE_WRAPPERTYPEINFO();
40 42
41 public: 43 public:
42 static AudioProcessingEvent* create(); 44 static AudioProcessingEvent* create();
43 static AudioProcessingEvent* create(AudioBuffer* inputBuffer, 45 static AudioProcessingEvent* create(AudioBuffer* inputBuffer,
44 AudioBuffer* outputBuffer, 46 AudioBuffer* outputBuffer,
45 double playbackTime); 47 double playbackTime);
46 48
49 static AudioProcessingEvent* create(const AtomicString& type,
50 const AudioProcessingEventInit&);
51
47 ~AudioProcessingEvent() override; 52 ~AudioProcessingEvent() override;
48 53
49 AudioBuffer* inputBuffer() { return m_inputBuffer.get(); } 54 AudioBuffer* inputBuffer() { return m_inputBuffer.get(); }
50 AudioBuffer* outputBuffer() { return m_outputBuffer.get(); } 55 AudioBuffer* outputBuffer() { return m_outputBuffer.get(); }
51 double playbackTime() const { return m_playbackTime; } 56 double playbackTime() const { return m_playbackTime; }
52 57
53 const AtomicString& interfaceName() const override; 58 const AtomicString& interfaceName() const override;
54 59
55 DECLARE_VIRTUAL_TRACE(); 60 DECLARE_VIRTUAL_TRACE();
56 61
57 private: 62 private:
58 AudioProcessingEvent(); 63 AudioProcessingEvent();
59 AudioProcessingEvent(AudioBuffer* inputBuffer, 64 AudioProcessingEvent(AudioBuffer* inputBuffer,
60 AudioBuffer* outputBuffer, 65 AudioBuffer* outputBuffer,
61 double playbackTime); 66 double playbackTime);
67 AudioProcessingEvent(const AtomicString& type,
68 const AudioProcessingEventInit&);
62 69
63 Member<AudioBuffer> m_inputBuffer; 70 Member<AudioBuffer> m_inputBuffer;
64 Member<AudioBuffer> m_outputBuffer; 71 Member<AudioBuffer> m_outputBuffer;
65 double m_playbackTime; 72 double m_playbackTime;
66 }; 73 };
67 74
68 } // namespace blink 75 } // namespace blink
69 76
70 #endif // AudioProcessingEvent_h 77 #endif // AudioProcessingEvent_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698