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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 static const int defaultToneDurationMs = 100; | 43 static const int defaultToneDurationMs = 100; |
44 static const int maxToneDurationMs = 6000; | 44 static const int maxToneDurationMs = 6000; |
45 static const int minInterToneGapMs = 50; | 45 static const int minInterToneGapMs = 50; |
46 static const int defaultInterToneGapMs = 50; | 46 static const int defaultInterToneGapMs = 50; |
47 | 47 |
48 RTCDTMFSender* RTCDTMFSender::create( | 48 RTCDTMFSender* RTCDTMFSender::create( |
49 ExecutionContext* context, | 49 ExecutionContext* context, |
50 WebRTCPeerConnectionHandler* peerConnectionHandler, | 50 WebRTCPeerConnectionHandler* peerConnectionHandler, |
51 MediaStreamTrack* track, | 51 MediaStreamTrack* track, |
52 ExceptionState& exceptionState) { | 52 ExceptionState& exceptionState) { |
53 std::unique_ptr<WebRTCDTMFSenderHandler> handler = | 53 std::unique_ptr<WebRTCDTMFSenderHandler> handler = WTF::wrapUnique( |
54 wrapUnique(peerConnectionHandler->createDTMFSender(track->component())); | 54 peerConnectionHandler->createDTMFSender(track->component())); |
55 if (!handler) { | 55 if (!handler) { |
56 exceptionState.throwDOMException(NotSupportedError, | 56 exceptionState.throwDOMException(NotSupportedError, |
57 "The MediaStreamTrack provided is not an " | 57 "The MediaStreamTrack provided is not an " |
58 "element of a MediaStream that's " | 58 "element of a MediaStream that's " |
59 "currently in the local streams set."); | 59 "currently in the local streams set."); |
60 return nullptr; | 60 return nullptr; |
61 } | 61 } |
62 | 62 |
63 RTCDTMFSender* dtmfSender = | 63 RTCDTMFSender* dtmfSender = |
64 new RTCDTMFSender(context, track, std::move(handler)); | 64 new RTCDTMFSender(context, track, std::move(handler)); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 } | 185 } |
186 | 186 |
187 DEFINE_TRACE(RTCDTMFSender) { | 187 DEFINE_TRACE(RTCDTMFSender) { |
188 visitor->trace(m_track); | 188 visitor->trace(m_track); |
189 visitor->trace(m_scheduledEvents); | 189 visitor->trace(m_scheduledEvents); |
190 EventTargetWithInlineData::trace(visitor); | 190 EventTargetWithInlineData::trace(visitor); |
191 ActiveDOMObject::trace(visitor); | 191 ActiveDOMObject::trace(visitor); |
192 } | 192 } |
193 | 193 |
194 } // namespace blink | 194 } // namespace blink |
OLD | NEW |