Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2004 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2004 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 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 247 this, &P2PTransportChannel::OnCandidatesAllocationDone); | 247 this, &P2PTransportChannel::OnCandidatesAllocationDone); |
| 248 session->StartGettingPorts(); | 248 session->StartGettingPorts(); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void P2PTransportChannel::AddConnection(Connection* connection) { | 251 void P2PTransportChannel::AddConnection(Connection* connection) { |
| 252 connections_.push_back(connection); | 252 connections_.push_back(connection); |
| 253 connection->set_remote_ice_mode(remote_ice_mode_); | 253 connection->set_remote_ice_mode(remote_ice_mode_); |
| 254 connection->set_receiving_timeout(receiving_timeout_); | 254 connection->set_receiving_timeout(receiving_timeout_); |
| 255 connection->SignalReadPacket.connect( | 255 connection->SignalReadPacket.connect( |
| 256 this, &P2PTransportChannel::OnReadPacket); | 256 this, &P2PTransportChannel::OnReadPacket); |
| 257 connection->SignalSentPacket.connect(this, | |
| 258 &P2PTransportChannel::OnPacketSent); | |
|
pthatcher1
2015/10/05 18:30:14
I think the OnX should have the same name as the S
stefan-webrtc
2015/10/07 16:55:25
Done. These should now all be aligned.
| |
| 257 connection->SignalReadyToSend.connect( | 259 connection->SignalReadyToSend.connect( |
| 258 this, &P2PTransportChannel::OnReadyToSend); | 260 this, &P2PTransportChannel::OnReadyToSend); |
| 259 connection->SignalStateChange.connect( | 261 connection->SignalStateChange.connect( |
| 260 this, &P2PTransportChannel::OnConnectionStateChange); | 262 this, &P2PTransportChannel::OnConnectionStateChange); |
| 261 connection->SignalDestroyed.connect( | 263 connection->SignalDestroyed.connect( |
| 262 this, &P2PTransportChannel::OnConnectionDestroyed); | 264 this, &P2PTransportChannel::OnConnectionDestroyed); |
| 263 connection->SignalNominated.connect(this, &P2PTransportChannel::OnNominated); | 265 connection->SignalNominated.connect(this, &P2PTransportChannel::OnNominated); |
| 264 had_connection_ = true; | 266 had_connection_ = true; |
| 265 } | 267 } |
| 266 | 268 |
| (...skipping 1082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1349 SignalReadPacket(this, data, len, packet_time, 0); | 1351 SignalReadPacket(this, data, len, packet_time, 0); |
| 1350 | 1352 |
| 1351 // May need to switch the sending connection based on the receiving media path | 1353 // May need to switch the sending connection based on the receiving media path |
| 1352 // if this is the controlled side. | 1354 // if this is the controlled side. |
| 1353 if (ice_role_ == ICEROLE_CONTROLLED && !best_nominated_connection() && | 1355 if (ice_role_ == ICEROLE_CONTROLLED && !best_nominated_connection() && |
| 1354 connection->writable() && best_connection_ != connection) { | 1356 connection->writable() && best_connection_ != connection) { |
| 1355 SwitchBestConnectionTo(connection); | 1357 SwitchBestConnectionTo(connection); |
| 1356 } | 1358 } |
| 1357 } | 1359 } |
| 1358 | 1360 |
| 1361 void P2PTransportChannel::OnPacketSent(Connection* connection, | |
| 1362 const rtc::SentPacket& sent_packet) { | |
| 1363 ASSERT(worker_thread_ == rtc::Thread::Current()); | |
| 1364 | |
| 1365 SignalSentPacket(this, sent_packet); | |
| 1366 } | |
| 1367 | |
| 1359 void P2PTransportChannel::OnReadyToSend(Connection* connection) { | 1368 void P2PTransportChannel::OnReadyToSend(Connection* connection) { |
| 1360 if (connection == best_connection_ && writable()) { | 1369 if (connection == best_connection_ && writable()) { |
| 1361 SignalReadyToSend(this); | 1370 SignalReadyToSend(this); |
| 1362 } | 1371 } |
| 1363 } | 1372 } |
| 1364 | 1373 |
| 1365 } // namespace cricket | 1374 } // namespace cricket |
| OLD | NEW |