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 780 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
791 | 791 |
792 RTCSessionDescription* RTCPeerConnection::remoteDescription() { | 792 RTCSessionDescription* RTCPeerConnection::remoteDescription() { |
793 WebRTCSessionDescription webSessionDescription = | 793 WebRTCSessionDescription webSessionDescription = |
794 m_peerHandler->remoteDescription(); | 794 m_peerHandler->remoteDescription(); |
795 if (webSessionDescription.isNull()) | 795 if (webSessionDescription.isNull()) |
796 return nullptr; | 796 return nullptr; |
797 | 797 |
798 return RTCSessionDescription::create(webSessionDescription); | 798 return RTCSessionDescription::create(webSessionDescription); |
799 } | 799 } |
800 | 800 |
801 void RTCPeerConnection::updateIce(ExecutionContext* context, | 801 void RTCPeerConnection::setConfiguration( |
802 const RTCConfiguration& rtcConfiguration, | 802 ExecutionContext* context, |
803 const Dictionary& mediaConstraints, | 803 const RTCConfiguration& rtcConfiguration, |
804 ExceptionState& exceptionState) { | 804 ExceptionState& exceptionState) { |
805 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) | 805 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) |
806 return; | 806 return; |
807 | 807 |
808 RtcpMuxPolicy selectedRtcpMuxPolicy = RtcpMuxPolicyDefault; | 808 RtcpMuxPolicy selectedRtcpMuxPolicy = RtcpMuxPolicyDefault; |
809 WebRTCConfiguration configuration = parseConfiguration( | 809 WebRTCConfiguration configuration = parseConfiguration( |
810 context, rtcConfiguration, exceptionState, &selectedRtcpMuxPolicy); | 810 context, rtcConfiguration, exceptionState, &selectedRtcpMuxPolicy); |
811 | 811 |
812 if (exceptionState.hadException()) | 812 if (exceptionState.hadException()) |
813 return; | 813 return; |
814 | 814 |
815 MediaErrorState mediaErrorState; | 815 MediaErrorState mediaErrorState; |
816 if (mediaErrorState.hadException()) { | 816 if (mediaErrorState.hadException()) { |
817 mediaErrorState.raiseException(exceptionState); | 817 mediaErrorState.raiseException(exceptionState); |
818 return; | 818 return; |
819 } | 819 } |
820 | 820 |
821 // Constraints are ignored. | 821 bool valid = m_peerHandler->setConfiguration(configuration); |
foolip
2016/11/17 10:13:40
Ah, right given this you could keep these changes
Taylor_Brandstetter
2016/11/17 21:32:52
Done.
| |
822 bool valid = m_peerHandler->updateICE(configuration); | 822 if (!valid) { |
823 if (!valid) | |
824 exceptionState.throwDOMException( | 823 exceptionState.throwDOMException( |
825 SyntaxError, | 824 SyntaxError, |
826 "Could not update the ICE Agent with the given configuration."); | 825 "Could not update the RTCPeerConnection with the given configuration."); |
826 } | |
827 } | 827 } |
828 | 828 |
829 ScriptPromise RTCPeerConnection::generateCertificate( | 829 ScriptPromise RTCPeerConnection::generateCertificate( |
830 ScriptState* scriptState, | 830 ScriptState* scriptState, |
831 const AlgorithmIdentifier& keygenAlgorithm, | 831 const AlgorithmIdentifier& keygenAlgorithm, |
832 ExceptionState& exceptionState) { | 832 ExceptionState& exceptionState) { |
833 // Normalize |keygenAlgorithm| with WebCrypto, making sure it is a recognized | 833 // Normalize |keygenAlgorithm| with WebCrypto, making sure it is a recognized |
834 // AlgorithmIdentifier. | 834 // AlgorithmIdentifier. |
835 WebCryptoAlgorithm cryptoAlgorithm; | 835 WebCryptoAlgorithm cryptoAlgorithm; |
836 AlgorithmError error; | 836 AlgorithmError error; |
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1479 DEFINE_TRACE(RTCPeerConnection) { | 1479 DEFINE_TRACE(RTCPeerConnection) { |
1480 visitor->trace(m_localStreams); | 1480 visitor->trace(m_localStreams); |
1481 visitor->trace(m_remoteStreams); | 1481 visitor->trace(m_remoteStreams); |
1482 visitor->trace(m_dispatchScheduledEventRunner); | 1482 visitor->trace(m_dispatchScheduledEventRunner); |
1483 visitor->trace(m_scheduledEvents); | 1483 visitor->trace(m_scheduledEvents); |
1484 EventTargetWithInlineData::trace(visitor); | 1484 EventTargetWithInlineData::trace(visitor); |
1485 ActiveDOMObject::trace(visitor); | 1485 ActiveDOMObject::trace(visitor); |
1486 } | 1486 } |
1487 | 1487 |
1488 } // namespace blink | 1488 } // namespace blink |
OLD | NEW |