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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 #include "wtf/PtrUtil.h" | 93 #include "wtf/PtrUtil.h" |
| 94 #include <algorithm> |
94 #include <memory> | 95 #include <memory> |
95 | 96 |
96 namespace blink { | 97 namespace blink { |
97 | 98 |
98 namespace { | 99 namespace { |
99 | 100 |
100 const char kSignalingStateClosedMessage[] = "The RTCPeerConnection's signalingSt
ate is 'closed'."; | 101 const char kSignalingStateClosedMessage[] = "The RTCPeerConnection's signalingSt
ate is 'closed'."; |
101 | 102 |
102 bool throwExceptionIfSignalingStateClosed(RTCPeerConnection::SignalingState stat
e, ExceptionState& exceptionState) | 103 bool throwExceptionIfSignalingStateClosed(RTCPeerConnection::SignalingState stat
e, ExceptionState& exceptionState) |
103 { | 104 { |
(...skipping 30 matching lines...) Expand all Loading... |
134 return !iceCandidateInit.hasSdpMid() && !iceCandidateInit.hasSdpMLineInd
ex(); | 135 return !iceCandidateInit.hasSdpMid() && !iceCandidateInit.hasSdpMLineInd
ex(); |
135 } | 136 } |
136 | 137 |
137 DCHECK(candidate.isRTCIceCandidate()); | 138 DCHECK(candidate.isRTCIceCandidate()); |
138 return false; | 139 return false; |
139 } | 140 } |
140 | 141 |
141 WebRTCOfferOptions convertToWebRTCOfferOptions(const RTCOfferOptions& options) | 142 WebRTCOfferOptions convertToWebRTCOfferOptions(const RTCOfferOptions& options) |
142 { | 143 { |
143 return WebRTCOfferOptions(RTCOfferOptionsPlatform::create( | 144 return WebRTCOfferOptions(RTCOfferOptionsPlatform::create( |
144 -1, -1, | 145 options.hasOfferToReceiveVideo() ? std::max(options.offerToReceiveVideo(
), 0) : -1, |
| 146 options.hasOfferToReceiveAudio() ? std::max(options.offerToReceiveAudio(
), 0) : -1, |
145 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true, | 147 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true, |
146 options.hasIceRestart() ? options.iceRestart() : false)); | 148 options.hasIceRestart() ? options.iceRestart() : false)); |
147 } | 149 } |
148 | 150 |
149 WebRTCAnswerOptions convertToWebRTCAnswerOptions(const RTCAnswerOptions& options
) | 151 WebRTCAnswerOptions convertToWebRTCAnswerOptions(const RTCAnswerOptions& options
) |
150 { | 152 { |
151 return WebRTCAnswerOptions(RTCAnswerOptionsPlatform::create( | 153 return WebRTCAnswerOptions(RTCAnswerOptionsPlatform::create( |
152 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true)); | 154 options.hasVoiceActivityDetection() ? options.voiceActivityDetection() :
true)); |
153 } | 155 } |
154 | 156 |
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1227 { | 1229 { |
1228 visitor->trace(m_localStreams); | 1230 visitor->trace(m_localStreams); |
1229 visitor->trace(m_remoteStreams); | 1231 visitor->trace(m_remoteStreams); |
1230 visitor->trace(m_dispatchScheduledEventRunner); | 1232 visitor->trace(m_dispatchScheduledEventRunner); |
1231 visitor->trace(m_scheduledEvents); | 1233 visitor->trace(m_scheduledEvents); |
1232 EventTargetWithInlineData::trace(visitor); | 1234 EventTargetWithInlineData::trace(visitor); |
1233 ActiveDOMObject::trace(visitor); | 1235 ActiveDOMObject::trace(visitor); |
1234 } | 1236 } |
1235 | 1237 |
1236 } // namespace blink | 1238 } // namespace blink |
OLD | NEW |