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

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

Issue 1996693002: Fire a signal when the transport channel state changes (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Changed signal name to SignalStateChanged Created 4 years, 6 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
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/faketransportcontroller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 channel_->SignalCandidateGathered.connect( 122 channel_->SignalCandidateGathered.connect(
123 this, &DtlsTransportChannelWrapper::OnCandidateGathered); 123 this, &DtlsTransportChannelWrapper::OnCandidateGathered);
124 channel_->SignalCandidatesRemoved.connect( 124 channel_->SignalCandidatesRemoved.connect(
125 this, &DtlsTransportChannelWrapper::OnCandidatesRemoved); 125 this, &DtlsTransportChannelWrapper::OnCandidatesRemoved);
126 channel_->SignalRoleConflict.connect(this, 126 channel_->SignalRoleConflict.connect(this,
127 &DtlsTransportChannelWrapper::OnRoleConflict); 127 &DtlsTransportChannelWrapper::OnRoleConflict);
128 channel_->SignalRouteChange.connect(this, 128 channel_->SignalRouteChange.connect(this,
129 &DtlsTransportChannelWrapper::OnRouteChange); 129 &DtlsTransportChannelWrapper::OnRouteChange);
130 channel_->SignalSelectedCandidatePairChanged.connect( 130 channel_->SignalSelectedCandidatePairChanged.connect(
131 this, &DtlsTransportChannelWrapper::OnSelectedCandidatePairChanged); 131 this, &DtlsTransportChannelWrapper::OnSelectedCandidatePairChanged);
132 channel_->SignalConnectionRemoved.connect(this, 132 channel_->SignalStateChanged.connect(
133 &DtlsTransportChannelWrapper::OnConnectionRemoved); 133 this, &DtlsTransportChannelWrapper::OnChannelStateChanged);
134 channel_->SignalReceivingState.connect(this, 134 channel_->SignalReceivingState.connect(this,
135 &DtlsTransportChannelWrapper::OnReceivingState); 135 &DtlsTransportChannelWrapper::OnReceivingState);
136 } 136 }
137 137
138 DtlsTransportChannelWrapper::~DtlsTransportChannelWrapper() { 138 DtlsTransportChannelWrapper::~DtlsTransportChannelWrapper() {
139 } 139 }
140 140
141 void DtlsTransportChannelWrapper::Connect() { 141 void DtlsTransportChannelWrapper::Connect() {
142 // We should only get a single call to Connect. 142 // We should only get a single call to Connect.
143 ASSERT(dtls_state() == DTLS_TRANSPORT_NEW); 143 ASSERT(dtls_state() == DTLS_TRANSPORT_NEW);
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
664 664
665 void DtlsTransportChannelWrapper::OnSelectedCandidatePairChanged( 665 void DtlsTransportChannelWrapper::OnSelectedCandidatePairChanged(
666 TransportChannel* channel, 666 TransportChannel* channel,
667 CandidatePairInterface* selected_candidate_pair, 667 CandidatePairInterface* selected_candidate_pair,
668 int last_sent_packet_id) { 668 int last_sent_packet_id) {
669 ASSERT(channel == channel_); 669 ASSERT(channel == channel_);
670 SignalSelectedCandidatePairChanged(this, selected_candidate_pair, 670 SignalSelectedCandidatePairChanged(this, selected_candidate_pair,
671 last_sent_packet_id); 671 last_sent_packet_id);
672 } 672 }
673 673
674 void DtlsTransportChannelWrapper::OnConnectionRemoved( 674 void DtlsTransportChannelWrapper::OnChannelStateChanged(
675 TransportChannelImpl* channel) { 675 TransportChannelImpl* channel) {
676 ASSERT(channel == channel_); 676 ASSERT(channel == channel_);
677 SignalConnectionRemoved(this); 677 SignalStateChanged(this);
678 } 678 }
679 679
680 void DtlsTransportChannelWrapper::Reconnect() { 680 void DtlsTransportChannelWrapper::Reconnect() {
681 set_dtls_state(DTLS_TRANSPORT_NEW); 681 set_dtls_state(DTLS_TRANSPORT_NEW);
682 set_writable(false); 682 set_writable(false);
683 if (channel_->writable()) { 683 if (channel_->writable()) {
684 OnWritableState(channel_); 684 OnWritableState(channel_);
685 } 685 }
686 } 686 }
687 687
688 } // namespace cricket 688 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.h ('k') | webrtc/p2p/base/faketransportcontroller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698