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

Side by Side Diff: webrtc/p2p/base/faketransportcontroller.h

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.cc ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('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 2009 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2009 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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 state_ = STATE_CONNECTING; 163 state_ = STATE_CONNECTING;
164 set_writable(false); 164 set_writable(false);
165 } 165 }
166 } 166 }
167 167
168 void SetConnectionCount(size_t connection_count) { 168 void SetConnectionCount(size_t connection_count) {
169 size_t old_connection_count = connection_count_; 169 size_t old_connection_count = connection_count_;
170 connection_count_ = connection_count; 170 connection_count_ = connection_count;
171 if (connection_count) 171 if (connection_count)
172 had_connection_ = true; 172 had_connection_ = true;
173 // In this fake transport channel, |connection_count_| determines the
174 // transport channel state.
173 if (connection_count_ < old_connection_count) 175 if (connection_count_ < old_connection_count)
174 SignalConnectionRemoved(this); 176 SignalStateChanged(this);
175 } 177 }
176 178
177 void SetCandidatesGatheringComplete() { 179 void SetCandidatesGatheringComplete() {
178 if (gathering_state_ != kIceGatheringComplete) { 180 if (gathering_state_ != kIceGatheringComplete) {
179 gathering_state_ = kIceGatheringComplete; 181 gathering_state_ = kIceGatheringComplete;
180 SignalGatheringState(this); 182 SignalGatheringState(this);
181 } 183 }
182 } 184 }
183 185
184 void SetReceiving(bool receiving) { set_receiving(receiving); } 186 void SetReceiving(bool receiving) { set_receiving(receiving); }
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
580 } 582 }
581 } 583 }
582 584
583 private: 585 private:
584 bool fail_create_channel_; 586 bool fail_create_channel_;
585 }; 587 };
586 588
587 } // namespace cricket 589 } // namespace cricket
588 590
589 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_ 591 #endif // WEBRTC_P2P_BASE_FAKETRANSPORTCONTROLLER_H_
OLDNEW
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/p2ptransportchannel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698