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

Unified Diff: third_party/mojo/src/mojo/public/dart/src/event_stream.dart

Issue 883843002: Update mojo sdk to rev 126532ce21c5c3c55a1e1693731411cb60169efd (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Response to review Created 5 years, 11 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/mojo/src/mojo/public/dart/src/event_stream.dart
diff --git a/third_party/mojo/src/mojo/public/dart/src/event_stream.dart b/third_party/mojo/src/mojo/public/dart/src/event_stream.dart
index 7016b3115b1984c9010c344d3656d83afc982296..610285a358d3eed64f1e5f6c4d236a1b0bb203c6 100644
--- a/third_party/mojo/src/mojo/public/dart/src/event_stream.dart
+++ b/third_party/mojo/src/mojo/public/dart/src/event_stream.dart
@@ -16,7 +16,7 @@ class MojoEventStream extends Stream<int> {
// events.
SendPort _sendPort;
- // The receive port on which we listen and receive events from the handle
+ // The receive port on which we listen and receive events from the handle
// watcher.
ReceivePort _receivePort;
@@ -118,8 +118,11 @@ class MojoEventStream extends Stream<int> {
String toString() => "$_handle";
}
+abstract class Listener {
+ StreamSubscription<List<int>> listen();
+}
-class MojoEventStreamListener {
+class MojoEventStreamListener implements Listener {
MojoMessagePipeEndpoint _endpoint;
MojoEventStream _eventStream;
bool _isOpen = false;
@@ -155,7 +158,7 @@ class MojoEventStreamListener {
_isOpen = false;
}
- StreamSubscription<int> listen() {
+ StreamSubscription<List<int>> listen() {
_isOpen = true;
return _eventStream.listen((List<int> event) {
var signalsWatched = new MojoHandleSignals(event[0]);
« no previous file with comments | « third_party/mojo/src/mojo/public/dart/src/codec.dart ('k') | third_party/mojo/src/mojo/public/dart/src/interface.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698