| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 return WebRTCConfiguration(); | 312 return WebRTCConfiguration(); |
| 313 } | 313 } |
| 314 if (!(url.protocolIs("turn") || url.protocolIs("turns") || | 314 if (!(url.protocolIs("turn") || url.protocolIs("turns") || |
| 315 url.protocolIs("stun"))) { | 315 url.protocolIs("stun"))) { |
| 316 exceptionState.throwDOMException( | 316 exceptionState.throwDOMException( |
| 317 SyntaxError, "'" + url.protocol() + | 317 SyntaxError, "'" + url.protocol() + |
| 318 "' is not one of the supported URL schemes " | 318 "' is not one of the supported URL schemes " |
| 319 "'stun', 'turn' or 'turns'."); | 319 "'stun', 'turn' or 'turns'."); |
| 320 return WebRTCConfiguration(); | 320 return WebRTCConfiguration(); |
| 321 } | 321 } |
| 322 if ((url.protocolIs("turn") || url.protocolIs("turns")) && |
| 323 (username.isNull() || credential.isNull())) { |
| 324 exceptionState.throwDOMException(InvalidAccessError, |
| 325 "Both username and credential are " |
| 326 "required when the URL scheme is " |
| 327 "\"turn\" or \"turns\"."); |
| 328 } |
| 322 iceServers.append(WebRTCIceServer{url, username, credential}); | 329 iceServers.append(WebRTCIceServer{url, username, credential}); |
| 323 } | 330 } |
| 324 } | 331 } |
| 325 webConfiguration.iceServers = iceServers; | 332 webConfiguration.iceServers = iceServers; |
| 326 } | 333 } |
| 327 | 334 |
| 328 if (configuration.hasCertificates()) { | 335 if (configuration.hasCertificates()) { |
| 329 const HeapVector<Member<RTCCertificate>>& certificates = | 336 const HeapVector<Member<RTCCertificate>>& certificates = |
| 330 configuration.certificates(); | 337 configuration.certificates(); |
| 331 WebVector<std::unique_ptr<WebRTCCertificate>> certificatesCopy( | 338 WebVector<std::unique_ptr<WebRTCCertificate>> certificatesCopy( |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1472 DEFINE_TRACE(RTCPeerConnection) { | 1479 DEFINE_TRACE(RTCPeerConnection) { |
| 1473 visitor->trace(m_localStreams); | 1480 visitor->trace(m_localStreams); |
| 1474 visitor->trace(m_remoteStreams); | 1481 visitor->trace(m_remoteStreams); |
| 1475 visitor->trace(m_dispatchScheduledEventRunner); | 1482 visitor->trace(m_dispatchScheduledEventRunner); |
| 1476 visitor->trace(m_scheduledEvents); | 1483 visitor->trace(m_scheduledEvents); |
| 1477 EventTargetWithInlineData::trace(visitor); | 1484 EventTargetWithInlineData::trace(visitor); |
| 1478 ActiveDOMObject::trace(visitor); | 1485 ActiveDOMObject::trace(visitor); |
| 1479 } | 1486 } |
| 1480 | 1487 |
| 1481 } // namespace blink | 1488 } // namespace blink |
| OLD | NEW |