Index: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl |
diff --git a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl |
index deae54878157784616d043a995c05605b4c7ef33..813a5eb996e87d299cb940329fdd234e851d7d16 100644 |
--- a/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl |
+++ b/third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl |
@@ -73,16 +73,15 @@ enum RTCIceConnectionState { |
] interface RTCPeerConnection : EventTarget { |
// Promise<RTCSessionDescription> createOffer(optional RTCOfferOptions options); |
// Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions options); |
- // Promise<void> setLocalDescription(RTCSessionDescription description); |
+ [CallWith=ScriptState] Promise<void> setLocalDescription(RTCSessionDescriptionInit description); |
readonly attribute RTCSessionDescription? localDescription; |
// readonly attribute RTCSessionDescription? currentLocalDescription; |
// readonly attribute RTCSessionDescription? pendingLocalDescription; |
- // Promise<void> setRemoteDescription(RTCSessionDescription description); |
+ [CallWith=ScriptState] Promise<void> setRemoteDescription(RTCSessionDescriptionInit description); |
readonly attribute RTCSessionDescription? remoteDescription; |
// readonly attribute RTCSessionDescription? currentRemoteDescription; |
// readonly attribute RTCSessionDescription? pendingRemoteDescription; |
- // TODO(guidou): addIceCandidate() should return a Promise. |
- [RaisesException] void addIceCandidate(RTCIceCandidate candidate); |
+ [CallWith=ScriptState] Promise<void> addIceCandidate ((RTCIceCandidateInit or RTCIceCandidate) candidate); |
readonly attribute RTCSignalingState signalingState; |
readonly attribute RTCIceGatheringState iceGatheringState; |
readonly attribute RTCIceConnectionState iceConnectionState; |
@@ -101,12 +100,10 @@ enum RTCIceConnectionState { |
[CallWith=ExecutionContext, RaisesException] void createOffer(RTCSessionDescriptionCallback successCallback, RTCErrorCallback failureCallback, optional Dictionary rtcOfferOptions); |
// TODO(guidou): There should be no mediaConstraints argument. |
[CallWith=ExecutionContext, RaisesException] void createAnswer(RTCSessionDescriptionCallback successCallback, RTCErrorCallback failureCallback, optional Dictionary mediaConstraints); |
- // TODO(guidou): None of the arguments should be optional. |
- [CallWith=ExecutionContext, RaisesException] void setLocalDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback); |
- // TODO(guidou): The successCallback and failureCallback arguments should be |
- // non-optional. |
- [CallWith=ExecutionContext, RaisesException] void setRemoteDescription(RTCSessionDescription description, [Default=Undefined] optional VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback); |
- [RaisesException] void addIceCandidate(RTCIceCandidate candidate, VoidCallback successCallback, RTCErrorCallback failureCallback); |
+ [CallWith=ExecutionContext] Promise<void> setLocalDescription(RTCSessionDescription description, VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback); |
+ // TODO(guidou): The failureCallback argument should be non-optional. |
+ [CallWith=ExecutionContext] Promise<void> setRemoteDescription(RTCSessionDescription description, VoidCallback successCallback, [Default=Undefined] optional RTCErrorCallback failureCallback); |
+ Promise<void> addIceCandidate(RTCIceCandidate candidate, VoidCallback successCallback, RTCErrorCallback failureCallback); |
// TODO(guidou): The selector argument should the first (nullable, |
// non-optional) argument, and there should be a third failureCallback |
// argument. |