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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 MediaStreamTrack* RTCDTMFSender::track() const | 82 MediaStreamTrack* RTCDTMFSender::track() const |
83 { | 83 { |
84 return m_track.get(); | 84 return m_track.get(); |
85 } | 85 } |
86 | 86 |
87 String RTCDTMFSender::toneBuffer() const | 87 String RTCDTMFSender::toneBuffer() const |
88 { | 88 { |
89 return m_handler->currentToneBuffer(); | 89 return m_handler->currentToneBuffer(); |
90 } | 90 } |
91 | 91 |
92 void RTCDTMFSender::insertDTMF(const String& tones, ExceptionState& exceptionSta
te) | |
93 { | |
94 insertDTMF(tones, defaultToneDurationMs, defaultInterToneGapMs, exceptionSta
te); | |
95 } | |
96 | |
97 void RTCDTMFSender::insertDTMF(const String& tones, long duration, ExceptionStat
e& exceptionState) | |
98 { | |
99 insertDTMF(tones, duration, defaultInterToneGapMs, exceptionState); | |
100 } | |
101 | |
102 void RTCDTMFSender::insertDTMF(const String& tones, long duration, long interTon
eGap, ExceptionState& exceptionState) | 92 void RTCDTMFSender::insertDTMF(const String& tones, long duration, long interTon
eGap, ExceptionState& exceptionState) |
103 { | 93 { |
104 if (!canInsertDTMF()) { | 94 if (!canInsertDTMF()) { |
105 exceptionState.throwDOMException(NotSupportedError, "The 'canInsertDTMF'
attribute is false: this sender cannot send DTMF."); | 95 exceptionState.throwDOMException(NotSupportedError, "The 'canInsertDTMF'
attribute is false: this sender cannot send DTMF."); |
106 return; | 96 return; |
107 } | 97 } |
108 | 98 |
109 if (duration > maxToneDurationMs || duration < minToneDurationMs) { | 99 if (duration > maxToneDurationMs || duration < minToneDurationMs) { |
110 exceptionState.throwDOMException(SyntaxError, ExceptionMessages::indexOu
tsideRange("duration", duration, minToneDurationMs, ExceptionMessages::Exclusive
Bound, maxToneDurationMs, ExceptionMessages::ExclusiveBound)); | 100 exceptionState.throwDOMException(SyntaxError, ExceptionMessages::indexOu
tsideRange("duration", duration, minToneDurationMs, ExceptionMessages::Exclusive
Bound, maxToneDurationMs, ExceptionMessages::ExclusiveBound)); |
111 return; | 101 return; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 } | 156 } |
167 | 157 |
168 void RTCDTMFSender::trace(Visitor* visitor) | 158 void RTCDTMFSender::trace(Visitor* visitor) |
169 { | 159 { |
170 visitor->trace(m_track); | 160 visitor->trace(m_track); |
171 visitor->trace(m_scheduledEvents); | 161 visitor->trace(m_scheduledEvents); |
172 EventTargetWithInlineData::trace(visitor); | 162 EventTargetWithInlineData::trace(visitor); |
173 } | 163 } |
174 | 164 |
175 } // namespace blink | 165 } // namespace blink |
OLD | NEW |