OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 1187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1198 session_->SetIceConfig(session_->ParseIceConfig(config)); | 1198 session_->SetIceConfig(session_->ParseIceConfig(config)); |
1199 return session_->SetIceTransports(config.type); | 1199 return session_->SetIceTransports(config.type); |
1200 } | 1200 } |
1201 | 1201 |
1202 bool PeerConnection::AddIceCandidate( | 1202 bool PeerConnection::AddIceCandidate( |
1203 const IceCandidateInterface* ice_candidate) { | 1203 const IceCandidateInterface* ice_candidate) { |
1204 TRACE_EVENT0("webrtc", "PeerConnection::AddIceCandidate"); | 1204 TRACE_EVENT0("webrtc", "PeerConnection::AddIceCandidate"); |
1205 return session_->ProcessIceMessage(ice_candidate); | 1205 return session_->ProcessIceMessage(ice_candidate); |
1206 } | 1206 } |
1207 | 1207 |
| 1208 bool PeerConnection::RemoveIceCandidates( |
| 1209 const std::vector<cricket::Candidate>& candidates) { |
| 1210 TRACE_EVENT0("webrtc", "PeerConnection::RemoveIceCandidates"); |
| 1211 return session_->RemoveRemoteIceCandidates(candidates); |
| 1212 } |
| 1213 |
1208 void PeerConnection::RegisterUMAObserver(UMAObserver* observer) { | 1214 void PeerConnection::RegisterUMAObserver(UMAObserver* observer) { |
1209 TRACE_EVENT0("webrtc", "PeerConnection::RegisterUmaObserver"); | 1215 TRACE_EVENT0("webrtc", "PeerConnection::RegisterUmaObserver"); |
1210 uma_observer_ = observer; | 1216 uma_observer_ = observer; |
1211 | 1217 |
1212 if (session_) { | 1218 if (session_) { |
1213 session_->set_metrics_observer(uma_observer_); | 1219 session_->set_metrics_observer(uma_observer_); |
1214 } | 1220 } |
1215 | 1221 |
1216 // Send information about IPv4/IPv6 status. | 1222 // Send information about IPv4/IPv6 status. |
1217 if (uma_observer_ && port_allocator_) { | 1223 if (uma_observer_ && port_allocator_) { |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 } | 1383 } |
1378 ice_gathering_state_ = new_state; | 1384 ice_gathering_state_ = new_state; |
1379 observer_->OnIceGatheringChange(ice_gathering_state_); | 1385 observer_->OnIceGatheringChange(ice_gathering_state_); |
1380 } | 1386 } |
1381 | 1387 |
1382 void PeerConnection::OnIceCandidate(const IceCandidateInterface* candidate) { | 1388 void PeerConnection::OnIceCandidate(const IceCandidateInterface* candidate) { |
1383 RTC_DCHECK(signaling_thread()->IsCurrent()); | 1389 RTC_DCHECK(signaling_thread()->IsCurrent()); |
1384 observer_->OnIceCandidate(candidate); | 1390 observer_->OnIceCandidate(candidate); |
1385 } | 1391 } |
1386 | 1392 |
| 1393 void PeerConnection::OnIceCandidatesRemoved( |
| 1394 const std::vector<cricket::Candidate>& candidates) { |
| 1395 RTC_DCHECK(signaling_thread()->IsCurrent()); |
| 1396 observer_->OnIceCandidatesRemoved(candidates); |
| 1397 } |
| 1398 |
1387 void PeerConnection::OnIceConnectionReceivingChange(bool receiving) { | 1399 void PeerConnection::OnIceConnectionReceivingChange(bool receiving) { |
1388 RTC_DCHECK(signaling_thread()->IsCurrent()); | 1400 RTC_DCHECK(signaling_thread()->IsCurrent()); |
1389 observer_->OnIceConnectionReceivingChange(receiving); | 1401 observer_->OnIceConnectionReceivingChange(receiving); |
1390 } | 1402 } |
1391 | 1403 |
1392 void PeerConnection::ChangeSignalingState( | 1404 void PeerConnection::ChangeSignalingState( |
1393 PeerConnectionInterface::SignalingState signaling_state) { | 1405 PeerConnectionInterface::SignalingState signaling_state) { |
1394 signaling_state_ = signaling_state; | 1406 signaling_state_ = signaling_state; |
1395 if (signaling_state == kClosed) { | 1407 if (signaling_state == kClosed) { |
1396 ice_connection_state_ = kIceConnectionClosed; | 1408 ice_connection_state_ = kIceConnectionClosed; |
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2110 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { | 2122 DataChannel* PeerConnection::FindDataChannelBySid(int sid) const { |
2111 for (const auto& channel : sctp_data_channels_) { | 2123 for (const auto& channel : sctp_data_channels_) { |
2112 if (channel->id() == sid) { | 2124 if (channel->id() == sid) { |
2113 return channel; | 2125 return channel; |
2114 } | 2126 } |
2115 } | 2127 } |
2116 return nullptr; | 2128 return nullptr; |
2117 } | 2129 } |
2118 | 2130 |
2119 } // namespace webrtc | 2131 } // namespace webrtc |
OLD | NEW |