Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(280)

Side by Side Diff: webrtc/p2p/base/dtlstransportchannel.cc

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Set media engine on voice channel Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2011 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2011 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 ssl_role_(rtc::SSL_CLIENT), 99 ssl_role_(rtc::SSL_CLIENT),
100 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) { 100 ssl_max_version_(rtc::SSL_PROTOCOL_DTLS_10) {
101 channel_->SignalReadableState.connect(this, 101 channel_->SignalReadableState.connect(this,
102 &DtlsTransportChannelWrapper::OnReadableState); 102 &DtlsTransportChannelWrapper::OnReadableState);
103 channel_->SignalWritableState.connect(this, 103 channel_->SignalWritableState.connect(this,
104 &DtlsTransportChannelWrapper::OnWritableState); 104 &DtlsTransportChannelWrapper::OnWritableState);
105 channel_->SignalReadPacket.connect(this, 105 channel_->SignalReadPacket.connect(this,
106 &DtlsTransportChannelWrapper::OnReadPacket); 106 &DtlsTransportChannelWrapper::OnReadPacket);
107 channel_->SignalReadyToSend.connect(this, 107 channel_->SignalReadyToSend.connect(this,
108 &DtlsTransportChannelWrapper::OnReadyToSend); 108 &DtlsTransportChannelWrapper::OnReadyToSend);
109 channel_->SignalRequestSignaling.connect(this, 109 channel_->SignalGatheringState.connect(
110 &DtlsTransportChannelWrapper::OnRequestSignaling); 110 this, &DtlsTransportChannelWrapper::OnGatheringState);
111 channel_->SignalCandidateReady.connect(this, 111 channel_->SignalCandidateGathered.connect(
112 &DtlsTransportChannelWrapper::OnCandidateReady); 112 this, &DtlsTransportChannelWrapper::OnCandidateGathered);
113 channel_->SignalCandidatesAllocationDone.connect(this,
114 &DtlsTransportChannelWrapper::OnCandidatesAllocationDone);
115 channel_->SignalRoleConflict.connect(this, 113 channel_->SignalRoleConflict.connect(this,
116 &DtlsTransportChannelWrapper::OnRoleConflict); 114 &DtlsTransportChannelWrapper::OnRoleConflict);
117 channel_->SignalRouteChange.connect(this, 115 channel_->SignalRouteChange.connect(this,
118 &DtlsTransportChannelWrapper::OnRouteChange); 116 &DtlsTransportChannelWrapper::OnRouteChange);
119 channel_->SignalConnectionRemoved.connect(this, 117 channel_->SignalConnectionRemoved.connect(this,
120 &DtlsTransportChannelWrapper::OnConnectionRemoved); 118 &DtlsTransportChannelWrapper::OnConnectionRemoved);
121 channel_->SignalReceivingState.connect(this, 119 channel_->SignalReceivingState.connect(this,
122 &DtlsTransportChannelWrapper::OnReceivingState); 120 &DtlsTransportChannelWrapper::OnReceivingState);
123 } 121 }
124 122
(...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
608 606
609 tmp_data += record_len + kDtlsRecordHeaderLen; 607 tmp_data += record_len + kDtlsRecordHeaderLen;
610 tmp_size -= record_len + kDtlsRecordHeaderLen; 608 tmp_size -= record_len + kDtlsRecordHeaderLen;
611 } 609 }
612 610
613 // Looks good. Pass to the SIC which ends up being passed to 611 // Looks good. Pass to the SIC which ends up being passed to
614 // the DTLS stack. 612 // the DTLS stack.
615 return downward_->OnPacketReceived(data, size); 613 return downward_->OnPacketReceived(data, size);
616 } 614 }
617 615
618 void DtlsTransportChannelWrapper::OnRequestSignaling( 616 void DtlsTransportChannelWrapper::OnGatheringState(
619 TransportChannelImpl* channel) { 617 TransportChannelImpl* channel) {
620 ASSERT(channel == channel_); 618 ASSERT(channel == channel_);
621 SignalRequestSignaling(this); 619 SignalGatheringState(this);
622 } 620 }
623 621
624 void DtlsTransportChannelWrapper::OnCandidateReady( 622 void DtlsTransportChannelWrapper::OnCandidateGathered(
625 TransportChannelImpl* channel, const Candidate& c) { 623 TransportChannelImpl* channel,
624 const Candidate& c) {
626 ASSERT(channel == channel_); 625 ASSERT(channel == channel_);
627 SignalCandidateReady(this, c); 626 SignalCandidateGathered(this, c);
628 }
629
630 void DtlsTransportChannelWrapper::OnCandidatesAllocationDone(
631 TransportChannelImpl* channel) {
632 ASSERT(channel == channel_);
633 SignalCandidatesAllocationDone(this);
634 } 627 }
635 628
636 void DtlsTransportChannelWrapper::OnRoleConflict( 629 void DtlsTransportChannelWrapper::OnRoleConflict(
637 TransportChannelImpl* channel) { 630 TransportChannelImpl* channel) {
638 ASSERT(channel == channel_); 631 ASSERT(channel == channel_);
639 SignalRoleConflict(this); 632 SignalRoleConflict(this);
640 } 633 }
641 634
642 void DtlsTransportChannelWrapper::OnRouteChange( 635 void DtlsTransportChannelWrapper::OnRouteChange(
643 TransportChannel* channel, const Candidate& candidate) { 636 TransportChannel* channel, const Candidate& candidate) {
644 ASSERT(channel == channel_); 637 ASSERT(channel == channel_);
645 SignalRouteChange(this, candidate); 638 SignalRouteChange(this, candidate);
646 } 639 }
647 640
648 void DtlsTransportChannelWrapper::OnConnectionRemoved( 641 void DtlsTransportChannelWrapper::OnConnectionRemoved(
649 TransportChannelImpl* channel) { 642 TransportChannelImpl* channel) {
650 ASSERT(channel == channel_); 643 ASSERT(channel == channel_);
651 SignalConnectionRemoved(this); 644 SignalConnectionRemoved(this);
652 } 645 }
653 646
654 } // namespace cricket 647 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698