OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 12 matching lines...) Expand all Loading... |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef RTCDTMFSender_h | 26 #ifndef RTCDTMFSender_h |
27 #define RTCDTMFSender_h | 27 #define RTCDTMFSender_h |
28 | 28 |
29 #include "core/dom/ActiveDOMObject.h" | 29 #include "core/dom/ActiveDOMObject.h" |
30 #include "modules/EventTargetModules.h" | 30 #include "modules/EventTargetModules.h" |
31 #include "platform/Timer.h" | 31 #include "platform/Timer.h" |
32 #include "public/platform/WebRTCDTMFSenderHandlerClient.h" | 32 #include "public/platform/WebRTCDTMFSenderHandlerClient.h" |
33 #include <memory> | |
34 | 33 |
35 namespace blink { | 34 namespace blink { |
36 | 35 |
37 class ExceptionState; | 36 class ExceptionState; |
38 class MediaStreamTrack; | 37 class MediaStreamTrack; |
39 class WebRTCDTMFSenderHandler; | 38 class WebRTCDTMFSenderHandler; |
40 class WebRTCPeerConnectionHandler; | 39 class WebRTCPeerConnectionHandler; |
41 | 40 |
42 class RTCDTMFSender final | 41 class RTCDTMFSender final |
43 : public EventTargetWithInlineData | 42 : public EventTargetWithInlineData |
(...skipping 21 matching lines...) Expand all Loading... |
65 // EventTarget | 64 // EventTarget |
66 const AtomicString& interfaceName() const override; | 65 const AtomicString& interfaceName() const override; |
67 ExecutionContext* getExecutionContext() const override; | 66 ExecutionContext* getExecutionContext() const override; |
68 | 67 |
69 // ActiveDOMObject | 68 // ActiveDOMObject |
70 void stop() override; | 69 void stop() override; |
71 | 70 |
72 DECLARE_VIRTUAL_TRACE(); | 71 DECLARE_VIRTUAL_TRACE(); |
73 | 72 |
74 private: | 73 private: |
75 RTCDTMFSender(ExecutionContext*, MediaStreamTrack*, std::unique_ptr<WebRTCDT
MFSenderHandler>); | 74 RTCDTMFSender(ExecutionContext*, MediaStreamTrack*, PassOwnPtr<WebRTCDTMFSen
derHandler>); |
76 void dispose(); | 75 void dispose(); |
77 | 76 |
78 void scheduleDispatchEvent(Event*); | 77 void scheduleDispatchEvent(Event*); |
79 void scheduledEventTimerFired(Timer<RTCDTMFSender>*); | 78 void scheduledEventTimerFired(Timer<RTCDTMFSender>*); |
80 | 79 |
81 // WebRTCDTMFSenderHandlerClient | 80 // WebRTCDTMFSenderHandlerClient |
82 void didPlayTone(const WebString&) override; | 81 void didPlayTone(const WebString&) override; |
83 | 82 |
84 Member<MediaStreamTrack> m_track; | 83 Member<MediaStreamTrack> m_track; |
85 int m_duration; | 84 int m_duration; |
86 int m_interToneGap; | 85 int m_interToneGap; |
87 | 86 |
88 std::unique_ptr<WebRTCDTMFSenderHandler> m_handler; | 87 OwnPtr<WebRTCDTMFSenderHandler> m_handler; |
89 | 88 |
90 bool m_stopped; | 89 bool m_stopped; |
91 | 90 |
92 Timer<RTCDTMFSender> m_scheduledEventTimer; | 91 Timer<RTCDTMFSender> m_scheduledEventTimer; |
93 HeapVector<Member<Event>> m_scheduledEvents; | 92 HeapVector<Member<Event>> m_scheduledEvents; |
94 }; | 93 }; |
95 | 94 |
96 } // namespace blink | 95 } // namespace blink |
97 | 96 |
98 #endif // RTCDTMFSender_h | 97 #endif // RTCDTMFSender_h |
OLD | NEW |