OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 868 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
879 void PeerConnection::OnIceCandidate(const IceCandidateInterface* candidate) { | 879 void PeerConnection::OnIceCandidate(const IceCandidateInterface* candidate) { |
880 ASSERT(signaling_thread()->IsCurrent()); | 880 ASSERT(signaling_thread()->IsCurrent()); |
881 observer_->OnIceCandidate(candidate); | 881 observer_->OnIceCandidate(candidate); |
882 } | 882 } |
883 | 883 |
884 void PeerConnection::OnIceComplete() { | 884 void PeerConnection::OnIceComplete() { |
885 ASSERT(signaling_thread()->IsCurrent()); | 885 ASSERT(signaling_thread()->IsCurrent()); |
886 observer_->OnIceComplete(); | 886 observer_->OnIceComplete(); |
887 } | 887 } |
888 | 888 |
| 889 void PeerConnection::OnIceConnectionReceivingChange(bool receiving) { |
| 890 ASSERT(signaling_thread()->IsCurrent()); |
| 891 observer_->OnIceConnectionReceivingChange(receiving); |
| 892 } |
| 893 |
889 void PeerConnection::ChangeSignalingState( | 894 void PeerConnection::ChangeSignalingState( |
890 PeerConnectionInterface::SignalingState signaling_state) { | 895 PeerConnectionInterface::SignalingState signaling_state) { |
891 signaling_state_ = signaling_state; | 896 signaling_state_ = signaling_state; |
892 if (signaling_state == kClosed) { | 897 if (signaling_state == kClosed) { |
893 ice_connection_state_ = kIceConnectionClosed; | 898 ice_connection_state_ = kIceConnectionClosed; |
894 observer_->OnIceConnectionChange(ice_connection_state_); | 899 observer_->OnIceConnectionChange(ice_connection_state_); |
895 if (ice_gathering_state_ != kIceGatheringComplete) { | 900 if (ice_gathering_state_ != kIceGatheringComplete) { |
896 ice_gathering_state_ = kIceGatheringComplete; | 901 ice_gathering_state_ = kIceGatheringComplete; |
897 observer_->OnIceGatheringChange(ice_gathering_state_); | 902 observer_->OnIceGatheringChange(ice_gathering_state_); |
898 } | 903 } |
899 } | 904 } |
900 observer_->OnSignalingChange(signaling_state_); | 905 observer_->OnSignalingChange(signaling_state_); |
901 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); | 906 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); |
902 } | 907 } |
903 | 908 |
904 } // namespace webrtc | 909 } // namespace webrtc |
OLD | NEW |