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 2084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2095 return nullptr; | 2095 return nullptr; |
2096 } | 2096 } |
2097 rtp_data_channels_[channel->label()] = channel; | 2097 rtp_data_channels_[channel->label()] = channel; |
2098 } else { | 2098 } else { |
2099 RTC_DCHECK(channel->data_channel_type() == cricket::DCT_SCTP); | 2099 RTC_DCHECK(channel->data_channel_type() == cricket::DCT_SCTP); |
2100 sctp_data_channels_.push_back(channel); | 2100 sctp_data_channels_.push_back(channel); |
2101 channel->SignalClosed.connect(this, | 2101 channel->SignalClosed.connect(this, |
2102 &PeerConnection::OnSctpDataChannelClosed); | 2102 &PeerConnection::OnSctpDataChannelClosed); |
2103 } | 2103 } |
2104 | 2104 |
| 2105 SignalDataChannelCreated(channel.get()); |
2105 return channel; | 2106 return channel; |
2106 } | 2107 } |
2107 | 2108 |
2108 bool PeerConnection::HasDataChannels() const { | 2109 bool PeerConnection::HasDataChannels() const { |
2109 #ifdef HAVE_QUIC | 2110 #ifdef HAVE_QUIC |
2110 return !rtp_data_channels_.empty() || !sctp_data_channels_.empty() || | 2111 return !rtp_data_channels_.empty() || !sctp_data_channels_.empty() || |
2111 (session_->quic_data_transport() && | 2112 (session_->quic_data_transport() && |
2112 session_->quic_data_transport()->HasDataChannels()); | 2113 session_->quic_data_transport()->HasDataChannels()); |
2113 #else | 2114 #else |
2114 return !rtp_data_channels_.empty() || !sctp_data_channels_.empty(); | 2115 return !rtp_data_channels_.empty() || !sctp_data_channels_.empty(); |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2349 | 2350 |
2350 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, | 2351 bool PeerConnection::StartRtcEventLog_w(rtc::PlatformFile file, |
2351 int64_t max_size_bytes) { | 2352 int64_t max_size_bytes) { |
2352 return event_log_->StartLogging(file, max_size_bytes); | 2353 return event_log_->StartLogging(file, max_size_bytes); |
2353 } | 2354 } |
2354 | 2355 |
2355 void PeerConnection::StopRtcEventLog_w() { | 2356 void PeerConnection::StopRtcEventLog_w() { |
2356 event_log_->StopLogging(); | 2357 event_log_->StopLogging(); |
2357 } | 2358 } |
2358 } // namespace webrtc | 2359 } // namespace webrtc |
OLD | NEW |