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

Side by Side Diff: third_party/WebKit/Source/modules/mediastream/RTCPeerConnection.idl

Issue 2007923003: Use Init dictionaries in RTCPeerConnection legacy methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 [CallWith=ScriptState] Promise<RTCSessionDescription> createOffer(optional R TCOfferOptions options); 73 [CallWith=ScriptState] Promise<RTCSessionDescription> createOffer(optional R TCOfferOptions options);
74 [CallWith=ScriptState] Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions options); 74 [CallWith=ScriptState] Promise<RTCSessionDescription> createAnswer(optional RTCAnswerOptions options);
75 [CallWith=ScriptState] Promise<void> setLocalDescription(RTCSessionDescripti onInit description); 75 [CallWith=ScriptState] Promise<void> setLocalDescription(RTCSessionDescripti onInit description);
76 readonly attribute RTCSessionDescription? localDescription; 76 readonly attribute RTCSessionDescription? localDescription;
77 // readonly attribute RTCSessionDescription? currentLocalDescription; 77 // readonly attribute RTCSessionDescription? currentLocalDescription;
78 // readonly attribute RTCSessionDescription? pendingLocalDescription; 78 // readonly attribute RTCSessionDescription? pendingLocalDescription;
79 [CallWith=ScriptState] Promise<void> setRemoteDescription(RTCSessionDescript ionInit description); 79 [CallWith=ScriptState] Promise<void> setRemoteDescription(RTCSessionDescript ionInit description);
80 readonly attribute RTCSessionDescription? remoteDescription; 80 readonly attribute RTCSessionDescription? remoteDescription;
81 // readonly attribute RTCSessionDescription? currentRemoteDescription; 81 // readonly attribute RTCSessionDescription? currentRemoteDescription;
82 // readonly attribute RTCSessionDescription? pendingRemoteDescription; 82 // readonly attribute RTCSessionDescription? pendingRemoteDescription;
83 [CallWith=ScriptState] Promise<void> addIceCandidate ((RTCIceCandidateInit o r RTCIceCandidate) candidate); 83 [CallWith=ScriptState, MeasureAs=RTCPeerConnectionAddIceCandidatePromise] Pr omise<void> addIceCandidate ((RTCIceCandidateInit or RTCIceCandidate) candidate) ;
84 readonly attribute RTCSignalingState signalingState; 84 readonly attribute RTCSignalingState signalingState;
85 readonly attribute RTCIceGatheringState iceGatheringState; 85 readonly attribute RTCIceGatheringState iceGatheringState;
86 readonly attribute RTCIceConnectionState iceConnectionState; 86 readonly attribute RTCIceConnectionState iceConnectionState;
87 // readonly attribute boolean? canTrickleIceCandidates; 87 // readonly attribute boolean? canTrickleIceCandidates;
88 // RTCConfiguration getConfiguration(); 88 // RTCConfiguration getConfiguration();
89 // void setConfiguration(RTCConfiguration configuration); 89 // void setConfiguration(RTCConfiguration configuration);
90 // TODO(guidou): close() should never throw an exception. 90 // TODO(guidou): close() should never throw an exception.
91 [RaisesException] void close(); 91 [RaisesException] void close();
92 attribute EventHandler onnegotiationneeded; 92 attribute EventHandler onnegotiationneeded;
93 attribute EventHandler onicecandidate; 93 attribute EventHandler onicecandidate;
94 attribute EventHandler onsignalingstatechange; 94 attribute EventHandler onsignalingstatechange;
95 attribute EventHandler oniceconnectionstatechange; 95 attribute EventHandler oniceconnectionstatechange;
96 // attribute EventHandler onicegatheringstatechange; 96 // attribute EventHandler onicegatheringstatechange;
97 97
98 // https://w3c.github.io/webrtc-pc/#legacy-interface-extensions 98 // https://w3c.github.io/webrtc-pc/#legacy-interface-extensions
99 // These methods return Promise<void> because having Promise-based versions requires that all overloads return Promises. 99 // These methods return Promise<void> because having Promise-based versions requires that all overloads return Promises.
100 [CallWith=ScriptState] Promise<void> createOffer(RTCSessionDescriptionCallba ck successCallback, RTCPeerConnectionErrorCallback failureCallback, optional Dic tionary rtcOfferOptions); 100 [CallWith=ScriptState] Promise<void> createOffer(RTCSessionDescriptionCallba ck successCallback, RTCPeerConnectionErrorCallback failureCallback, optional Dic tionary rtcOfferOptions);
101 // TODO(guidou): There should be no mediaConstraints argument. 101 // TODO(guidou): There should be no mediaConstraints argument.
102 [CallWith=ScriptState] Promise<void> createAnswer(RTCSessionDescriptionCallb ack successCallback, RTCPeerConnectionErrorCallback failureCallback, optional Di ctionary mediaConstraints); 102 [CallWith=ScriptState] Promise<void> createAnswer(RTCSessionDescriptionCallb ack successCallback, RTCPeerConnectionErrorCallback failureCallback, optional Di ctionary mediaConstraints);
103 [CallWith=ScriptState] Promise<void> setLocalDescription(RTCSessionDescripti on description, VoidCallback successCallback, [Default=Undefined] optional RTCPe erConnectionErrorCallback failureCallback); 103 [CallWith=ScriptState] Promise<void> setLocalDescription(RTCSessionDescripti onInit description, VoidCallback successCallback, [Default=Undefined] optional R TCPeerConnectionErrorCallback failureCallback);
104 // TODO(guidou): The failureCallback argument should be non-optional. 104 // TODO(guidou): The failureCallback argument should be non-optional.
105 [CallWith=ScriptState] Promise<void> setRemoteDescription(RTCSessionDescript ion description, VoidCallback successCallback, [Default=Undefined] optional RTCP eerConnectionErrorCallback failureCallback); 105 [CallWith=ScriptState] Promise<void> setRemoteDescription(RTCSessionDescript ionInit description, VoidCallback successCallback, [Default=Undefined] optional RTCPeerConnectionErrorCallback failureCallback);
106 [CallWith=ScriptState] Promise<void> addIceCandidate(RTCIceCandidate candida te, VoidCallback successCallback, RTCPeerConnectionErrorCallback failureCallback ); 106 [CallWith=ScriptState, MeasureAs=RTCPeerConnectionAddIceCandidateLegacy] Pro mise<void> addIceCandidate((RTCIceCandidateInit or RTCIceCandidate) candidate, V oidCallback successCallback, RTCPeerConnectionErrorCallback failureCallback);
107 // TODO(guidou): The selector argument should the first (nullable, 107 // TODO(guidou): The selector argument should the first (nullable,
108 // non-optional) argument, and there should be a third failureCallback 108 // non-optional) argument, and there should be a third failureCallback
109 // argument. 109 // argument.
110 [CallWith=ExecutionContext, LegacyInterfaceTypeChecking] void getStats(RTCSt atsCallback successCallback, [Default=Undefined] optional MediaStreamTrack selec tor); 110 [CallWith=ExecutionContext, LegacyInterfaceTypeChecking] void getStats(RTCSt atsCallback successCallback, [Default=Undefined] optional MediaStreamTrack selec tor);
111 111
112 // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api 112 // https://w3c.github.io/webrtc-pc/#peer-to-peer-data-api
113 // TODO(guidou): The label argument should have [TreatNullAs=EmptyString] 113 // TODO(guidou): The label argument should have [TreatNullAs=EmptyString]
114 // and be non-nullable. 114 // and be non-nullable.
115 [RaisesException] RTCDataChannel createDataChannel([TreatUndefinedAs=NullStr ing] DOMString? label, optional Dictionary options); 115 [RaisesException] RTCDataChannel createDataChannel([TreatUndefinedAs=NullStr ing] DOMString? label, optional Dictionary options);
116 attribute EventHandler ondatachannel; 116 attribute EventHandler ondatachannel;
117 117
118 // Non-standard or removed from the spec: 118 // Non-standard or removed from the spec:
119 [CallWith=ExecutionContext, RaisesException] void updateIce(optional Diction ary configuration, optional Dictionary mediaConstraints); 119 [CallWith=ExecutionContext, RaisesException] void updateIce(optional Diction ary configuration, optional Dictionary mediaConstraints);
120 sequence<MediaStream> getLocalStreams(); 120 sequence<MediaStream> getLocalStreams();
121 sequence<MediaStream> getRemoteStreams(); 121 sequence<MediaStream> getRemoteStreams();
122 MediaStream getStreamById(DOMString streamId); 122 MediaStream getStreamById(DOMString streamId);
123 [CallWith=ExecutionContext, RaisesException] void addStream(MediaStream? str eam, optional Dictionary mediaConstraints); 123 [CallWith=ExecutionContext, RaisesException] void addStream(MediaStream? str eam, optional Dictionary mediaConstraints);
124 [RaisesException] void removeStream(MediaStream? stream); 124 [RaisesException] void removeStream(MediaStream? stream);
125 [RaisesException] RTCDTMFSender createDTMFSender(MediaStreamTrack track); 125 [RaisesException] RTCDTMFSender createDTMFSender(MediaStreamTrack track);
126 attribute EventHandler onaddstream; 126 attribute EventHandler onaddstream;
127 attribute EventHandler onremovestream; 127 attribute EventHandler onremovestream;
128 128
129 // Certificate management 129 // Certificate management
130 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt 130 // http://w3c.github.io/webrtc-pc/#sec.cert-mgmt
131 [RaisesException, CallWith=ScriptState] static Promise<RTCCertificate> gener ateCertificate(AlgorithmIdentifier keygenAlgorithm); 131 [RaisesException, CallWith=ScriptState] static Promise<RTCCertificate> gener ateCertificate(AlgorithmIdentifier keygenAlgorithm);
132 }; 132 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698