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

Unified Diff: mojo/public/dart/mojo/lib/src/proxy.dart

Issue 1414483010: Dart: Use a RawReceivePort to receive events for Mojo handles. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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 | « mojo/public/dart/mojo/lib/src/handle.dart ('k') | mojo/public/dart/mojo/lib/src/stub.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/dart/mojo/lib/src/proxy.dart
diff --git a/mojo/public/dart/mojo/lib/src/proxy.dart b/mojo/public/dart/mojo/lib/src/proxy.dart
index 2e5b93e209a82496f78b24e8424bfae49965295f..72ef13daa575db2121467655da7eee67f0098ae2 100644
--- a/mojo/public/dart/mojo/lib/src/proxy.dart
+++ b/mojo/public/dart/mojo/lib/src/proxy.dart
@@ -10,8 +10,8 @@ class ProxyError {
String toString() => "ProxyError: $message";
}
-abstract class Proxy extends core.MojoEventStreamListener {
- final Map<int, Completer> _completerMap = {};
+abstract class Proxy extends core.MojoEventHandler {
+ Map<int, Completer> _completerMap = {};
Completer _errorCompleter = new Completer();
Set<Completer> _errorCompleters;
int _nextId = 0;
@@ -80,10 +80,9 @@ abstract class Proxy extends core.MojoEventStreamListener {
return;
}
if (!isOpen) {
- listen();
+ beginHandlingEvents();
}
var header = new MessageHeader(name);
-
var serviceMessage = message.serializeWithHeader(header);
endpoint.write(serviceMessage.buffer, serviceMessage.buffer.lengthInBytes,
serviceMessage.handles);
@@ -99,7 +98,7 @@ abstract class Proxy extends core.MojoEventStreamListener {
return completer.future;
}
if (!isOpen) {
- listen();
+ beginHandlingEvents();
}
if (id == -1) {
id = _nextId++;
« no previous file with comments | « mojo/public/dart/mojo/lib/src/handle.dart ('k') | mojo/public/dart/mojo/lib/src/stub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698