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

Unified Diff: third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl

Issue 2413703002: Sync RTCDataChannel and RTCPeerConnection IDL with spec (Closed)
Patch Set: rebase Created 4 years, 2 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/peerconnection/RTCDataChannel.idl
diff --git a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl
index 7a7f020ae8aeb576eba2c3cbdb6363149dc5167e..3d86bb0cc28b3da77b8354eb819166186f68006e 100644
--- a/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl
+++ b/third_party/WebKit/Source/modules/peerconnection/RTCDataChannel.idl
@@ -23,22 +23,32 @@
* DAMAGE.
*/
-// http://dev.w3.org/2011/webrtc/editor/webrtc.html#idl-def-RTCDataChannel
+// https://w3c.github.io/webrtc-pc/#idl-def-rtcdatachannelstate
+
+enum RTCDataChannelState {
+ "connecting",
+ "open",
+ "closing",
+ "closed"
+};
+
+// https://w3c.github.io/webrtc-pc/#rtcdatachannel
[
ActiveScriptWrappable,
DependentLifetime,
NoInterfaceObject,
] interface RTCDataChannel : EventTarget {
- readonly attribute DOMString label;
- readonly attribute boolean reliable; // DEPRECATED
+ readonly attribute USVString label;
readonly attribute boolean ordered;
- readonly attribute unsigned short maxRetransmitTime;
- readonly attribute unsigned short maxRetransmits;
- readonly attribute DOMString protocol;
+ // TODO(foolip): |maxRetransmitTime| is called |maxPacketLifeTime| in the
+ // spec and both it and |maxRetransmits| are nullable.
+ [Measure] readonly attribute unsigned short maxRetransmitTime;
+ [Measure] readonly attribute unsigned short maxRetransmits;
+ readonly attribute USVString protocol;
readonly attribute boolean negotiated;
readonly attribute unsigned short id;
- readonly attribute DOMString readyState;
+ readonly attribute RTCDataChannelState readyState;
readonly attribute unsigned long bufferedAmount;
attribute unsigned long bufferedAmountLowThreshold;
attribute EventHandler onopen;
@@ -48,8 +58,12 @@
void close();
attribute EventHandler onmessage;
[RaisesException=Setter] attribute DOMString binaryType;
+ // TODO(foolip): |data| should be USVString.
[RaisesException] void send(DOMString data);
[RaisesException] void send(Blob data);
[RaisesException] void send(ArrayBuffer data);
[RaisesException] void send(ArrayBufferView data);
+
+ // Non-standard APIs
+ [Measure] readonly attribute boolean reliable;
};

Powered by Google App Engine
This is Rietveld 408576698