Chromium Code Reviews| Index: tools/dom/templates/html/impl/impl_RTCPeerConnection.darttemplate |
| diff --git a/tools/dom/templates/html/impl/impl_RTCPeerConnection.darttemplate b/tools/dom/templates/html/impl/impl_RTCPeerConnection.darttemplate |
| index edef2250882161c82f759d0c16a02e6c2eb69264..8af6b9a65ad52f57c082fe9d04c2f014931aaad2 100644 |
| --- a/tools/dom/templates/html/impl/impl_RTCPeerConnection.darttemplate |
| +++ b/tools/dom/templates/html/impl/impl_RTCPeerConnection.darttemplate |
| @@ -39,6 +39,21 @@ $if DART2JS |
| $else |
| static bool get supported => true; |
| $endif |
| + Future<RtcSessionDescription> createOffer([Map mediaConstraints]) { |
| + var completer = new Completer<RtcSessionDescription>(); |
| + _createOffer( |
| + (value) { completer.complete(value); }, |
|
Andrei Mouravski
2013/03/15 21:08:16
=> maybe? Here and below.
Emily Fortuna
2013/03/15 23:03:24
Last I checked the convention was don't use => if
Andrei Mouravski
2013/03/15 23:09:33
This: http://www.dartlang.org/articles/idiomatic-d
|
| + (error) { completer.completeError(error); }, mediaConstraints); |
| + return completer.future; |
| + } |
| + |
| + Future<RtcSessionDescription> createAnswer([Map mediaConstraints]) { |
| + var completer = new Completer<RtcSessionDescription>(); |
| + _createAnswer( |
| + (value) { completer.complete(value); }, |
| + (error) { completer.completeError(error); }, mediaConstraints); |
| + return completer.future; |
| + } |
| $!MEMBERS |
| } |