OLD | NEW |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |