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

Unified Diff: runtime/embedders/openglui/common/gl.dart

Issue 14237002: Add StreamSubscription.asFuture. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
« no previous file with comments | « no previous file | sdk/lib/async/stream.dart » ('j') | sdk/lib/async/stream.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/embedders/openglui/common/gl.dart
diff --git a/runtime/embedders/openglui/common/gl.dart b/runtime/embedders/openglui/common/gl.dart
index f709000b6b756def4da7a20bd2a8166475e021ba..9322201ed38b55c80162b8736e7b101cd05d3792 100644
--- a/runtime/embedders/openglui/common/gl.dart
+++ b/runtime/embedders/openglui/common/gl.dart
@@ -255,6 +255,12 @@ class _EventStreamSubscription<T extends Event> extends StreamSubscription<T> {
_target.removeListener(_eventType, _onData);
}
}
+
+ Future asFuture([var futureValue]) {
+ // We just need a future that will never succeed or fail.
+ Completer completer = new Completer();
+ return completer.future;
+ }
}
class _EventStream<T extends Event> extends Stream<T> {
« no previous file with comments | « no previous file | sdk/lib/async/stream.dart » ('j') | sdk/lib/async/stream.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698