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

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: Fix test case crash. 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..d3241a6db501311dfc8219a3c5087f44c463781a 100644
--- a/Source/modules/mediastream/RTCPeerConnection.h
+++ b/Source/modules/mediastream/RTCPeerConnection.h
@@ -36,6 +36,7 @@
#include "modules/EventTargetModules.h"
#include "modules/mediastream/MediaStream.h"
#include "modules/mediastream/RTCIceCandidate.h"
+#include "modules/mediastream/RTCVoidRequestImpl.h"
#include "platform/AsyncMethodRunner.h"
#include "public/platform/WebMediaConstraints.h"
#include "public/platform/WebRTCPeerConnectionHandler.h"
@@ -71,10 +72,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 +111,7 @@ 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 requestSucceeded(RTCVoidRequestImpl::RequestType);
DEFINE_ATTRIBUTE_EVENT_LISTENER(negotiationneeded);
DEFINE_ATTRIBUTE_EVENT_LISTENER(icecandidate);
@@ -164,6 +166,14 @@ private:
void closeInternal();
+ void commitPendingLocalSessionDescription();
+ void commitPendingRemoteSessionDescription();
+
+ 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