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

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

Issue 2511633002: Rename "updateICE" to "setConfiguration", everywhere except in Blink. (Closed)
Patch Set: Removing the IDL changes from this CL. Created 4 years, 1 month 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) 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
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 const Dictionary& mediaConstraints,
foolip 2016/11/18 08:56:05 Remove the argument name to make it obvious that i
Taylor_Brandstetter 2016/11/18 20:07:56 Done.
805 ExceptionState& exceptionState) {
805 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) 806 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
806 return; 807 return;
807 808
808 RtcpMuxPolicy selectedRtcpMuxPolicy = RtcpMuxPolicyDefault; 809 RtcpMuxPolicy selectedRtcpMuxPolicy = RtcpMuxPolicyDefault;
809 WebRTCConfiguration configuration = parseConfiguration( 810 WebRTCConfiguration configuration = parseConfiguration(
810 context, rtcConfiguration, exceptionState, &selectedRtcpMuxPolicy); 811 context, rtcConfiguration, exceptionState, &selectedRtcpMuxPolicy);
811 812
812 if (exceptionState.hadException()) 813 if (exceptionState.hadException())
813 return; 814 return;
814 815
815 MediaErrorState mediaErrorState; 816 MediaErrorState mediaErrorState;
816 if (mediaErrorState.hadException()) { 817 if (mediaErrorState.hadException()) {
817 mediaErrorState.raiseException(exceptionState); 818 mediaErrorState.raiseException(exceptionState);
818 return; 819 return;
819 } 820 }
820 821
821 // Constraints are ignored. 822 bool valid = m_peerHandler->setConfiguration(configuration);
822 bool valid = m_peerHandler->updateICE(configuration); 823 if (!valid) {
823 if (!valid)
824 exceptionState.throwDOMException( 824 exceptionState.throwDOMException(
825 SyntaxError, 825 SyntaxError,
826 "Could not update the ICE Agent with the given configuration."); 826 "Could not update the RTCPeerConnection with the given configuration.");
827 }
827 } 828 }
828 829
829 ScriptPromise RTCPeerConnection::generateCertificate( 830 ScriptPromise RTCPeerConnection::generateCertificate(
830 ScriptState* scriptState, 831 ScriptState* scriptState,
831 const AlgorithmIdentifier& keygenAlgorithm, 832 const AlgorithmIdentifier& keygenAlgorithm,
832 ExceptionState& exceptionState) { 833 ExceptionState& exceptionState) {
833 // Normalize |keygenAlgorithm| with WebCrypto, making sure it is a recognized 834 // Normalize |keygenAlgorithm| with WebCrypto, making sure it is a recognized
834 // AlgorithmIdentifier. 835 // AlgorithmIdentifier.
835 WebCryptoAlgorithm cryptoAlgorithm; 836 WebCryptoAlgorithm cryptoAlgorithm;
836 AlgorithmError error; 837 AlgorithmError error;
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
1479 DEFINE_TRACE(RTCPeerConnection) { 1480 DEFINE_TRACE(RTCPeerConnection) {
1480 visitor->trace(m_localStreams); 1481 visitor->trace(m_localStreams);
1481 visitor->trace(m_remoteStreams); 1482 visitor->trace(m_remoteStreams);
1482 visitor->trace(m_dispatchScheduledEventRunner); 1483 visitor->trace(m_dispatchScheduledEventRunner);
1483 visitor->trace(m_scheduledEvents); 1484 visitor->trace(m_scheduledEvents);
1484 EventTargetWithInlineData::trace(visitor); 1485 EventTargetWithInlineData::trace(visitor);
1485 ActiveDOMObject::trace(visitor); 1486 ActiveDOMObject::trace(visitor);
1486 } 1487 }
1487 1488
1488 } // namespace blink 1489 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698