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

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

Issue 1661493002: Add promise-based addIceCandidate, setLocalDescription and setRemoteDescription to RTCPeerConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: philipj's comments on tests Created 4 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/mediastream/RTCPeerConnection.h
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h
index b641e08ed4ce7fb3077badc0c6a64c88fc948390..06a9e7878d3ebece1ec0bdffc7bed1e933934cae 100644
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.h
@@ -50,10 +50,13 @@ class RTCConfiguration;
class RTCDTMFSender;
class RTCDataChannel;
class RTCErrorCallback;
+class RTCIceCandidateInitOrRTCIceCandidate;
class RTCOfferOptions;
class RTCSessionDescription;
class RTCSessionDescriptionCallback;
+class RTCSessionDescriptionInit;
class RTCStatsCallback;
+class ScriptState;
class VoidCallback;
class RTCPeerConnection final
@@ -72,10 +75,12 @@ public:
void createAnswer(ExecutionContext*, RTCSessionDescriptionCallback*, RTCErrorCallback*, const Dictionary&, ExceptionState&);
- void setLocalDescription(ExecutionContext*, RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&);
+ ScriptPromise setLocalDescription(ScriptState*, const RTCSessionDescriptionInit&);
+ ScriptPromise setLocalDescription(ScriptState*, RTCSessionDescription*, VoidCallback*, RTCErrorCallback*);
RTCSessionDescription* localDescription();
- void setRemoteDescription(ExecutionContext*, RTCSessionDescription*, VoidCallback*, RTCErrorCallback*, ExceptionState&);
+ ScriptPromise setRemoteDescription(ScriptState*, const RTCSessionDescriptionInit&);
+ ScriptPromise setRemoteDescription(ScriptState*, RTCSessionDescription*, VoidCallback*, RTCErrorCallback*);
RTCSessionDescription* remoteDescription();
String signalingState() const;
@@ -86,10 +91,8 @@ public:
// http://w3c.github.io/webrtc-pc/#sec.cert-mgmt
static ScriptPromise generateCertificate(ScriptState*, const AlgorithmIdentifier& keygenAlgorithm, ExceptionState&);
- // DEPRECATED
- void addIceCandidate(RTCIceCandidate*, ExceptionState&);
-
- void addIceCandidate(RTCIceCandidate*, VoidCallback*, RTCErrorCallback*, ExceptionState&);
+ ScriptPromise addIceCandidate(ScriptState*, const RTCIceCandidateInitOrRTCIceCandidate&);
+ ScriptPromise addIceCandidate(ScriptState*, RTCIceCandidate*, VoidCallback*, RTCErrorCallback*);
String iceGatheringState() const;

Powered by Google App Engine
This is Rietveld 408576698