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

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

Issue 2677233002: Expose RTCPeerConnection.icegatheringstatechange. (Closed)
Patch Set: codereview feedback 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 85cb675df52591ff30a073a66e2606b8d9868286..8c2f12f68ef3541352b8d324a90608696541fdb1 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCPeerConnection.cpp
@@ -1389,7 +1389,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(
@@ -1421,7 +1426,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