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

Side by Side Diff: talk/app/webrtc/peerconnection.cc

Issue 1246913005: TransportController refactoring (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 3 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 * 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 stream_handler_container_->RemoveLocalTrack(stream, video_track); 861 stream_handler_container_->RemoveLocalTrack(stream, video_track);
862 } 862 }
863 863
864 void PeerConnection::OnRemoveLocalStream(MediaStreamInterface* stream) { 864 void PeerConnection::OnRemoveLocalStream(MediaStreamInterface* stream) {
865 stream_handler_container_->RemoveLocalStream(stream); 865 stream_handler_container_->RemoveLocalStream(stream);
866 } 866 }
867 867
868 void PeerConnection::OnIceConnectionChange( 868 void PeerConnection::OnIceConnectionChange(
869 PeerConnectionInterface::IceConnectionState new_state) { 869 PeerConnectionInterface::IceConnectionState new_state) {
870 ASSERT(signaling_thread()->IsCurrent()); 870 ASSERT(signaling_thread()->IsCurrent());
871 // After transitioning to "closed", ignore any additional states from
872 // WebRtcSession (such as "disconnected").
873 if (ice_connection_state_ == kIceConnectionClosed) {
874 return;
875 }
871 ice_connection_state_ = new_state; 876 ice_connection_state_ = new_state;
872 observer_->OnIceConnectionChange(ice_connection_state_); 877 observer_->OnIceConnectionChange(ice_connection_state_);
873 } 878 }
874 879
875 void PeerConnection::OnIceGatheringChange( 880 void PeerConnection::OnIceGatheringChange(
876 PeerConnectionInterface::IceGatheringState new_state) { 881 PeerConnectionInterface::IceGatheringState new_state) {
877 ASSERT(signaling_thread()->IsCurrent()); 882 ASSERT(signaling_thread()->IsCurrent());
878 if (IsClosed()) { 883 if (IsClosed()) {
879 return; 884 return;
880 } 885 }
(...skipping 25 matching lines...) Expand all
906 if (ice_gathering_state_ != kIceGatheringComplete) { 911 if (ice_gathering_state_ != kIceGatheringComplete) {
907 ice_gathering_state_ = kIceGatheringComplete; 912 ice_gathering_state_ = kIceGatheringComplete;
908 observer_->OnIceGatheringChange(ice_gathering_state_); 913 observer_->OnIceGatheringChange(ice_gathering_state_);
909 } 914 }
910 } 915 }
911 observer_->OnSignalingChange(signaling_state_); 916 observer_->OnSignalingChange(signaling_state_);
912 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); 917 observer_->OnStateChange(PeerConnectionObserver::kSignalingState);
913 } 918 }
914 919
915 } // namespace webrtc 920 } // namespace webrtc
OLDNEW
« no previous file with comments | « talk/app/webrtc/objctests/RTCPeerConnectionSyncObserver.m ('k') | talk/app/webrtc/statscollector.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698