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

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

Issue 1729683002: Remove old-style constraints from Chrome internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Complete the interface change Created 4 years, 9 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) 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 void RTCPeerConnection::updateIce(ExecutionContext* context, const Dictionary& r tcConfiguration, const Dictionary& mediaConstraints, ExceptionState& exceptionSt ate) 586 void RTCPeerConnection::updateIce(ExecutionContext* context, const Dictionary& r tcConfiguration, const Dictionary& mediaConstraints, ExceptionState& exceptionSt ate)
587 { 587 {
588 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) 588 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState))
589 return; 589 return;
590 590
591 RTCConfiguration* configuration = parseConfiguration(rtcConfiguration, excep tionState); 591 RTCConfiguration* configuration = parseConfiguration(rtcConfiguration, excep tionState);
592 if (exceptionState.hadException()) 592 if (exceptionState.hadException())
593 return; 593 return;
594 594
595 MediaErrorState mediaErrorState; 595 MediaErrorState mediaErrorState;
596 WebMediaConstraints constraints = MediaConstraintsImpl::create(context, medi aConstraints, mediaErrorState);
597 if (mediaErrorState.hadException()) { 596 if (mediaErrorState.hadException()) {
598 mediaErrorState.raiseException(exceptionState); 597 mediaErrorState.raiseException(exceptionState);
599 return; 598 return;
600 } 599 }
601 600
602 bool valid = m_peerHandler->updateICE(configuration, constraints); 601 // Constraints are ignored.
602 bool valid = m_peerHandler->updateICE(configuration);
603 if (!valid) 603 if (!valid)
604 exceptionState.throwDOMException(SyntaxError, "Could not update the ICE Agent with the given configuration."); 604 exceptionState.throwDOMException(SyntaxError, "Could not update the ICE Agent with the given configuration.");
605 } 605 }
606 606
607 ScriptPromise RTCPeerConnection::generateCertificate(ScriptState* scriptState, c onst AlgorithmIdentifier& keygenAlgorithm, ExceptionState& exceptionState) 607 ScriptPromise RTCPeerConnection::generateCertificate(ScriptState* scriptState, c onst AlgorithmIdentifier& keygenAlgorithm, ExceptionState& exceptionState)
608 { 608 {
609 // Normalize |keygenAlgorithm| with WebCrypto, making sure it is a recognize d AlgorithmIdentifier. 609 // Normalize |keygenAlgorithm| with WebCrypto, making sure it is a recognize d AlgorithmIdentifier.
610 WebCryptoAlgorithm cryptoAlgorithm; 610 WebCryptoAlgorithm cryptoAlgorithm;
611 AlgorithmError error; 611 AlgorithmError error;
612 if (!normalizeAlgorithm(keygenAlgorithm, WebCryptoOperationGenerateKey, cryp toAlgorithm, &error)) { 612 if (!normalizeAlgorithm(keygenAlgorithm, WebCryptoOperationGenerateKey, cryp toAlgorithm, &error)) {
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
1121 { 1121 {
1122 visitor->trace(m_localStreams); 1122 visitor->trace(m_localStreams);
1123 visitor->trace(m_remoteStreams); 1123 visitor->trace(m_remoteStreams);
1124 visitor->trace(m_dispatchScheduledEventRunner); 1124 visitor->trace(m_dispatchScheduledEventRunner);
1125 visitor->trace(m_scheduledEvents); 1125 visitor->trace(m_scheduledEvents);
1126 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac e(visitor); 1126 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac e(visitor);
1127 ActiveDOMObject::trace(visitor); 1127 ActiveDOMObject::trace(visitor);
1128 } 1128 }
1129 1129
1130 } // namespace blink 1130 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698