| 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 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 354 | 354 |
| 355 if (!sessionDescription) { | 355 if (!sessionDescription) { |
| 356 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "RTCSessionDescription")); | 356 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "RTCSessionDescription")); |
| 357 return; | 357 return; |
| 358 } | 358 } |
| 359 | 359 |
| 360 RTCVoidRequest* request = RTCVoidRequestImpl::create(executionContext(), thi
s, successCallback, errorCallback); | 360 RTCVoidRequest* request = RTCVoidRequestImpl::create(executionContext(), thi
s, successCallback, errorCallback); |
| 361 m_peerHandler->setLocalDescription(request, sessionDescription->webSessionDe
scription()); | 361 m_peerHandler->setLocalDescription(request, sessionDescription->webSessionDe
scription()); |
| 362 } | 362 } |
| 363 | 363 |
| 364 RTCSessionDescription* RTCPeerConnection::localDescription(ExceptionState& excep
tionState) | 364 RTCSessionDescription* RTCPeerConnection::localDescription() |
| 365 { | 365 { |
| 366 WebRTCSessionDescription webSessionDescription = m_peerHandler->localDescrip
tion(); | 366 WebRTCSessionDescription webSessionDescription = m_peerHandler->localDescrip
tion(); |
| 367 if (webSessionDescription.isNull()) | 367 if (webSessionDescription.isNull()) |
| 368 return nullptr; | 368 return nullptr; |
| 369 | 369 |
| 370 return RTCSessionDescription::create(webSessionDescription); | 370 return RTCSessionDescription::create(webSessionDescription); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void RTCPeerConnection::setRemoteDescription(RTCSessionDescription* sessionDescr
iption, VoidCallback* successCallback, RTCErrorCallback* errorCallback, Exceptio
nState& exceptionState) | 373 void RTCPeerConnection::setRemoteDescription(RTCSessionDescription* sessionDescr
iption, VoidCallback* successCallback, RTCErrorCallback* errorCallback, Exceptio
nState& exceptionState) |
| 374 { | 374 { |
| 375 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) | 375 if (throwExceptionIfSignalingStateClosed(m_signalingState, exceptionState)) |
| 376 return; | 376 return; |
| 377 | 377 |
| 378 if (!sessionDescription) { | 378 if (!sessionDescription) { |
| 379 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "RTCSessionDescription")); | 379 exceptionState.throwDOMException(TypeMismatchError, ExceptionMessages::a
rgumentNullOrIncorrectType(1, "RTCSessionDescription")); |
| 380 return; | 380 return; |
| 381 } | 381 } |
| 382 | 382 |
| 383 RTCVoidRequest* request = RTCVoidRequestImpl::create(executionContext(), thi
s, successCallback, errorCallback); | 383 RTCVoidRequest* request = RTCVoidRequestImpl::create(executionContext(), thi
s, successCallback, errorCallback); |
| 384 m_peerHandler->setRemoteDescription(request, sessionDescription->webSessionD
escription()); | 384 m_peerHandler->setRemoteDescription(request, sessionDescription->webSessionD
escription()); |
| 385 } | 385 } |
| 386 | 386 |
| 387 RTCSessionDescription* RTCPeerConnection::remoteDescription(ExceptionState& exce
ptionState) | 387 RTCSessionDescription* RTCPeerConnection::remoteDescription() |
| 388 { | 388 { |
| 389 WebRTCSessionDescription webSessionDescription = m_peerHandler->remoteDescri
ption(); | 389 WebRTCSessionDescription webSessionDescription = m_peerHandler->remoteDescri
ption(); |
| 390 if (webSessionDescription.isNull()) | 390 if (webSessionDescription.isNull()) |
| 391 return nullptr; | 391 return nullptr; |
| 392 | 392 |
| 393 return RTCSessionDescription::create(webSessionDescription); | 393 return RTCSessionDescription::create(webSessionDescription); |
| 394 } | 394 } |
| 395 | 395 |
| 396 void RTCPeerConnection::updateIce(const Dictionary& rtcConfiguration, const Dict
ionary& mediaConstraints, ExceptionState& exceptionState) | 396 void RTCPeerConnection::updateIce(const Dictionary& rtcConfiguration, const Dict
ionary& mediaConstraints, ExceptionState& exceptionState) |
| 397 { | 397 { |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 847 { | 847 { |
| 848 visitor->trace(m_localStreams); | 848 visitor->trace(m_localStreams); |
| 849 visitor->trace(m_remoteStreams); | 849 visitor->trace(m_remoteStreams); |
| 850 visitor->trace(m_dataChannels); | 850 visitor->trace(m_dataChannels); |
| 851 visitor->trace(m_scheduledEvents); | 851 visitor->trace(m_scheduledEvents); |
| 852 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac
e(visitor); | 852 RefCountedGarbageCollectedEventTargetWithInlineData<RTCPeerConnection>::trac
e(visitor); |
| 853 ActiveDOMObject::trace(visitor); | 853 ActiveDOMObject::trace(visitor); |
| 854 } | 854 } |
| 855 | 855 |
| 856 } // namespace blink | 856 } // namespace blink |
| OLD | NEW |