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

Unified Diff: Source/modules/mediastream/RTCPeerConnection.h

Issue 1010393002: Fix issue of localDescription and remoteDescription getter. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add m_pendingLocalDescription. Created 5 years, 7 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: Source/modules/mediastream/RTCPeerConnection.h
diff --git a/Source/modules/mediastream/RTCPeerConnection.h b/Source/modules/mediastream/RTCPeerConnection.h
index bf040004b0b42800cbc8daa0bbb574c116439bfa..677efb175c87cb530423c6061bb1e7168126196e 100644
--- a/Source/modules/mediastream/RTCPeerConnection.h
+++ b/Source/modules/mediastream/RTCPeerConnection.h
@@ -71,10 +71,10 @@ public:
void createAnswer(RTCSessionDescriptionCallback*, RTCErrorCallback*, const Dictionary&, ExceptionState&);
void setLocalDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&);
- RTCSessionDescription* localDescription(ExceptionState&);
+ RTCSessionDescription* localDescription();
void setRemoteDescription(RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&);
- RTCSessionDescription* remoteDescription(ExceptionState&);
+ RTCSessionDescription* remoteDescription();
String signalingState() const;
@@ -110,6 +110,8 @@ public:
// We allow getStats after close, but not other calls or callbacks.
bool shouldFireDefaultCallbacks() { return !m_closed && !m_stopped; }
bool shouldFireGetStatsCallback() { return !m_stopped; }
+ void updateLocalSessionDescriptionIfNeeded(bool pending);
+ void updateRemoteSessionDescriptionIfNeeded(bool pending);
DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded);
DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate);
@@ -164,6 +166,11 @@ private:
void closeInternal();
+ Member<RTCSessionDescription> m_localDescription;
+ Member<RTCSessionDescription> m_remoteDescription;
+ Member<RTCSessionDescription> m_pendingLocalDescription;
+ Member<RTCSessionDescription> m_pendingRemoteDescription;
+
SignalingState m_signalingState;
ICEGatheringState m_iceGatheringState;
ICEConnectionState m_iceConnectionState;

Powered by Google App Engine
This is Rietveld 408576698