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

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp

Issue 2677233002: Expose RTCPeerConnection.icegatheringstatechange. (Closed)
Patch Set: fix number of passing tests Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
index 8fd23dbfde05e35696379d469a3dd8f9f52d2975..d7b7f965bac5e4440974c82bdab507146b3c5fde 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
@@ -1395,7 +1395,12 @@ void RTCPeerConnection::changeSignalingState(SignalingState signalingState) {
void RTCPeerConnection::changeIceGatheringState(
ICEGatheringState iceGatheringState) {
- m_iceGatheringState = iceGatheringState;
+ if (m_iceConnectionState != ICEConnectionStateClosed &&
+ m_iceGatheringState != iceGatheringState) {
+ m_iceGatheringState = iceGatheringState;
+ scheduleDispatchEvent(
+ Event::create(EventTypeNames::icegatheringstatechange));
+ }
}
bool RTCPeerConnection::setIceConnectionState(
@@ -1427,7 +1432,6 @@ void RTCPeerConnection::closeInternal() {
m_closed = true;
changeIceConnectionState(ICEConnectionStateClosed);
- changeIceGatheringState(ICEGatheringStateComplete);
changeSignalingState(SignalingStateClosed);
Document* document = toDocument(getExecutionContext());
HostsUsingFeatures::countAnyWorld(

Powered by Google App Engine
This is Rietveld 408576698