| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 #include "public/platform/WebRTCDataChannelHandler.h" | 83 #include "public/platform/WebRTCDataChannelHandler.h" |
| 84 #include "public/platform/WebRTCDataChannelInit.h" | 84 #include "public/platform/WebRTCDataChannelInit.h" |
| 85 #include "public/platform/WebRTCICECandidate.h" | 85 #include "public/platform/WebRTCICECandidate.h" |
| 86 #include "public/platform/WebRTCKeyParams.h" | 86 #include "public/platform/WebRTCKeyParams.h" |
| 87 #include "public/platform/WebRTCOfferOptions.h" | 87 #include "public/platform/WebRTCOfferOptions.h" |
| 88 #include "public/platform/WebRTCSessionDescription.h" | 88 #include "public/platform/WebRTCSessionDescription.h" |
| 89 #include "public/platform/WebRTCSessionDescriptionRequest.h" | 89 #include "public/platform/WebRTCSessionDescriptionRequest.h" |
| 90 #include "public/platform/WebRTCStatsRequest.h" | 90 #include "public/platform/WebRTCStatsRequest.h" |
| 91 #include "public/platform/WebRTCVoidRequest.h" | 91 #include "public/platform/WebRTCVoidRequest.h" |
| 92 #include "wtf/CurrentTime.h" | 92 #include "wtf/CurrentTime.h" |
| 93 | 93 #include <algorithm> |
| 94 #include <memory> | 94 #include <memory> |
| 95 | 95 |
| 96 namespace blink { | 96 namespace blink { |
| 97 | 97 |
| 98 namespace { | 98 namespace { |
| 99 | 99 |
| 100 const char kSignalingStateClosedMessage[] = "The RTCPeerConnection's signalingSt
ate is 'closed'."; | 100 const char kSignalingStateClosedMessage[] = "The RTCPeerConnection's signalingSt
ate is 'closed'."; |
| 101 | 101 |
| 102 bool throwExceptionIfSignalingStateClosed(RTCPeerConnection::SignalingState stat
e, ExceptionState& exceptionState) | 102 bool throwExceptionIfSignalingStateClosed(RTCPeerConnection::SignalingState stat
e, ExceptionState& exceptionState) |
| 103 { | 103 { |
| (...skipping 30 matching lines...) Expand all Loading... |
| 134 return !iceCandidateInit.hasSdpMid() && !iceCandidateInit.hasSdpMLineInd
ex(); | 134 return !iceCandidateInit.hasSdpMid() && !iceCandidateInit.hasSdpMLineInd
ex(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 DCHECK(candidate.isRTCIceCandidate()); | 137 DCHECK(candidate.isRTCIceCandidate()); |
| 138 return false; | 138 return false; |
| 139 } | 139 } |
| 140 | 140 |
| 141 WebRTCOfferOptions convertToWebRTCOfferOptions(const RTCOfferOptions& options) | 141 WebRTCOfferOptions convertToWebRTCOfferOptions(const RTCOfferOptions& options) |
| 142 { | 142 { |
| 143 return WebRTCOfferOptions(RTCOfferOptionsPlatform::create( | 143 return WebRTCOfferOptions(RTCOfferOptionsPlatform::create( |
| 144 -1, -1, | 144 options.hasOfferToReceiveVideo() ? std::max(options.offerToReceiveVideo(
), 0) : -1, |
| 145 options.hasOfferToReceiveAudio() ? std::max(options.offerToReceiveAudio(
), 0) : -1, |
| 145 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true, | 146 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true, |
| 146 options.hasIceRestart() ? options.iceRestart() : false)); | 147 options.hasIceRestart() ? options.iceRestart() : false)); |
| 147 } | 148 } |
| 148 | 149 |
| 149 WebRTCAnswerOptions convertToWebRTCAnswerOptions(const RTCAnswerOptions& options
) | 150 WebRTCAnswerOptions convertToWebRTCAnswerOptions(const RTCAnswerOptions& options
) |
| 150 { | 151 { |
| 151 return WebRTCAnswerOptions(RTCAnswerOptionsPlatform::create( | 152 return WebRTCAnswerOptions(RTCAnswerOptionsPlatform::create( |
| 152 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true)); | 153 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true)); |
| 153 } | 154 } |
| 154 | 155 |
| (...skipping 1058 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1213 { | 1214 { |
| 1214 visitor->trace(m_localStreams); | 1215 visitor->trace(m_localStreams); |
| 1215 visitor->trace(m_remoteStreams); | 1216 visitor->trace(m_remoteStreams); |
| 1216 visitor->trace(m_dispatchScheduledEventRunner); | 1217 visitor->trace(m_dispatchScheduledEventRunner); |
| 1217 visitor->trace(m_scheduledEvents); | 1218 visitor->trace(m_scheduledEvents); |
| 1218 EventTargetWithInlineData::trace(visitor); | 1219 EventTargetWithInlineData::trace(visitor); |
| 1219 ActiveDOMObject::trace(visitor); | 1220 ActiveDOMObject::trace(visitor); |
| 1220 } | 1221 } |
| 1221 | 1222 |
| 1222 } // namespace blink | 1223 } // namespace blink |
| OLD | NEW |