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

Side by Side Diff: third_party/WebKit/Source/modules/peerconnection/RTCDTMFSender.cpp

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 years, 10 months 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) 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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 ExceptionState& exceptionState) { 119 ExceptionState& exceptionState) {
120 if (!canInsertDTMF()) { 120 if (!canInsertDTMF()) {
121 exceptionState.throwDOMException(NotSupportedError, 121 exceptionState.throwDOMException(NotSupportedError,
122 "The 'canInsertDTMF' attribute is false: " 122 "The 'canInsertDTMF' attribute is false: "
123 "this sender cannot send DTMF."); 123 "this sender cannot send DTMF.");
124 return; 124 return;
125 } 125 }
126 126
127 if (duration > maxToneDurationMs || duration < minToneDurationMs) { 127 if (duration > maxToneDurationMs || duration < minToneDurationMs) {
128 exceptionState.throwDOMException( 128 exceptionState.throwDOMException(
129 SyntaxError, ExceptionMessages::indexOutsideRange( 129 SyntaxError,
130 "duration", duration, minToneDurationMs, 130 ExceptionMessages::indexOutsideRange(
131 ExceptionMessages::ExclusiveBound, maxToneDurationMs, 131 "duration", duration, minToneDurationMs,
132 ExceptionMessages::ExclusiveBound)); 132 ExceptionMessages::ExclusiveBound, maxToneDurationMs,
133 ExceptionMessages::ExclusiveBound));
133 return; 134 return;
134 } 135 }
135 136
136 if (interToneGap < minInterToneGapMs) { 137 if (interToneGap < minInterToneGapMs) {
137 exceptionState.throwDOMException( 138 exceptionState.throwDOMException(
138 SyntaxError, ExceptionMessages::indexExceedsMinimumBound( 139 SyntaxError,
139 "intertone gap", interToneGap, minInterToneGapMs)); 140 ExceptionMessages::indexExceedsMinimumBound(
141 "intertone gap", interToneGap, minInterToneGapMs));
140 return; 142 return;
141 } 143 }
142 144
143 m_duration = duration; 145 m_duration = duration;
144 m_interToneGap = interToneGap; 146 m_interToneGap = interToneGap;
145 147
146 if (!m_handler->insertDTMF(tones, m_duration, m_interToneGap)) 148 if (!m_handler->insertDTMF(tones, m_duration, m_interToneGap))
147 exceptionState.throwDOMException( 149 exceptionState.throwDOMException(
148 SyntaxError, "Could not send provided tones, '" + tones + "'."); 150 SyntaxError, "Could not send provided tones, '" + tones + "'.");
149 } 151 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 } 187 }
186 188
187 DEFINE_TRACE(RTCDTMFSender) { 189 DEFINE_TRACE(RTCDTMFSender) {
188 visitor->trace(m_track); 190 visitor->trace(m_track);
189 visitor->trace(m_scheduledEvents); 191 visitor->trace(m_scheduledEvents);
190 EventTargetWithInlineData::trace(visitor); 192 EventTargetWithInlineData::trace(visitor);
191 ContextLifecycleObserver::trace(visitor); 193 ContextLifecycleObserver::trace(visitor);
192 } 194 }
193 195
194 } // namespace blink 196 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698