| 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 KURL url(KURL(), urlString); | 308 KURL url(KURL(), urlString); |
| 309 if (!url.isValid() || | 309 if (!url.isValid() || |
| 310 !(url.protocolIs("turn") || url.protocolIs("turns") || | 310 !(url.protocolIs("turn") || url.protocolIs("turns") || |
| 311 url.protocolIs("stun"))) { | 311 url.protocolIs("stun"))) { |
| 312 exceptionState.throwDOMException( | 312 exceptionState.throwDOMException( |
| 313 SyntaxError, | 313 SyntaxError, |
| 314 "Unsupported URL \"" + urlString + | 314 "Unsupported URL \"" + urlString + |
| 315 "\". URL scheme must be \"stun\", \"turn\" or \"turns\"."); | 315 "\". URL scheme must be \"stun\", \"turn\" or \"turns\"."); |
| 316 return WebRTCConfiguration(); | 316 return WebRTCConfiguration(); |
| 317 } | 317 } |
| 318 if ((url.protocolIs("turn") || url.protocolIs("turns")) && |
| 319 (username.isNull() || credential.isNull())) { |
| 320 exceptionState.throwDOMException(InvalidAccessError, |
| 321 "Both username and credential are " |
| 322 "required when the URL scheme is " |
| 323 "\"turn\" or \"turns\"."); |
| 324 } |
| 318 iceServers.append(WebRTCIceServer{url, username, credential}); | 325 iceServers.append(WebRTCIceServer{url, username, credential}); |
| 319 } | 326 } |
| 320 } | 327 } |
| 321 webConfiguration.iceServers = iceServers; | 328 webConfiguration.iceServers = iceServers; |
| 322 } | 329 } |
| 323 | 330 |
| 324 if (configuration.hasCertificates()) { | 331 if (configuration.hasCertificates()) { |
| 325 const HeapVector<Member<RTCCertificate>>& certificates = | 332 const HeapVector<Member<RTCCertificate>>& certificates = |
| 326 configuration.certificates(); | 333 configuration.certificates(); |
| 327 WebVector<std::unique_ptr<WebRTCCertificate>> certificatesCopy( | 334 WebVector<std::unique_ptr<WebRTCCertificate>> certificatesCopy( |
| (...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1468 DEFINE_TRACE(RTCPeerConnection) { | 1475 DEFINE_TRACE(RTCPeerConnection) { |
| 1469 visitor->trace(m_localStreams); | 1476 visitor->trace(m_localStreams); |
| 1470 visitor->trace(m_remoteStreams); | 1477 visitor->trace(m_remoteStreams); |
| 1471 visitor->trace(m_dispatchScheduledEventRunner); | 1478 visitor->trace(m_dispatchScheduledEventRunner); |
| 1472 visitor->trace(m_scheduledEvents); | 1479 visitor->trace(m_scheduledEvents); |
| 1473 EventTargetWithInlineData::trace(visitor); | 1480 EventTargetWithInlineData::trace(visitor); |
| 1474 ActiveDOMObject::trace(visitor); | 1481 ActiveDOMObject::trace(visitor); |
| 1475 } | 1482 } |
| 1476 | 1483 |
| 1477 } // namespace blink | 1484 } // namespace blink |
| OLD | NEW |