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

Unified Diff: tools/dom/templates/html/impl/impl_RTCPeerConnection.darttemplate

Issue 12653008: Fix up static analysis errors introduced by Futures CL. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 9 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: 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
}

Powered by Google App Engine
This is Rietveld 408576698