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

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

Issue 1019173002: Update mojo sdk to rev 7214b7ec7d27563b2666afad86cf1c5895c56c18 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Keep permission service alive if embedder drops requests Created 5 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: third_party/mojo/src/mojo/public/dart/src/proxy.dart
diff --git a/third_party/mojo/src/mojo/public/dart/src/proxy.dart b/third_party/mojo/src/mojo/public/dart/src/proxy.dart
index f7c770f661eec75e183809e3249d5f7e2b0614f2..5317e5648b558843fb533c2e90c1b1f66083dccf 100644
--- a/third_party/mojo/src/mojo/public/dart/src/proxy.dart
+++ b/third_party/mojo/src/mojo/public/dart/src/proxy.dart
@@ -8,17 +8,17 @@ abstract class Proxy extends core.MojoEventStreamListener {
Map<int, Completer> _completerMap;
int _nextId = 0;
- Proxy(core.MojoMessagePipeEndpoint endpoint) :
- _completerMap = {},
- super(endpoint);
+ Proxy.fromEndpoint(core.MojoMessagePipeEndpoint endpoint)
+ : _completerMap = {},
+ super.fromEndpoint(endpoint);
- Proxy.fromHandle(core.MojoHandle handle) :
- _completerMap = {},
- super.fromHandle(handle);
+ Proxy.fromHandle(core.MojoHandle handle)
+ : _completerMap = {},
+ super.fromHandle(handle);
- Proxy.unbound() :
- _completerMap = {},
- super.unbound();
+ Proxy.unbound()
+ : _completerMap = {},
+ super.unbound();
void handleResponse(ServiceMessage reader);
@@ -47,15 +47,13 @@ abstract class Proxy extends core.MojoEventStreamListener {
var header = new MessageHeader(name);
var serviceMessage = message.serializeWithHeader(header);
endpoint.write(serviceMessage.buffer,
- serviceMessage.buffer.lengthInBytes,
- serviceMessage.handles);
+ serviceMessage.buffer.lengthInBytes, serviceMessage.handles);
if (!endpoint.status.isOk) {
throw "message pipe write failed - ${endpoint.status}";
}
}
- Future sendMessageWithRequestId(
- Struct message, int name, int id, int flags) {
+ Future sendMessageWithRequestId(Struct message, int name, int id, int flags) {
if (!isOpen) {
listen();
}
@@ -66,8 +64,7 @@ abstract class Proxy extends core.MojoEventStreamListener {
var header = new MessageHeader.withRequestId(name, flags, id);
var serviceMessage = message.serializeWithHeader(header);
endpoint.write(serviceMessage.buffer,
- serviceMessage.buffer.lengthInBytes,
- serviceMessage.handles);
+ serviceMessage.buffer.lengthInBytes, serviceMessage.handles);
if (!endpoint.status.isOk) {
throw "message pipe write failed - ${endpoint.status}";
}
@@ -79,11 +76,15 @@ abstract class Proxy extends core.MojoEventStreamListener {
// Need a getter for this for access in subclasses.
Map<int, Completer> get completerMap => _completerMap;
-}
+ String toString() {
+ var superString = super.toString();
+ return "Proxy(${superString})";
+ }
+}
// Generated Proxy classes implement this interface.
abstract class ProxyBase {
- final Proxy impl;
- final String name;
+ final Proxy impl = null;
+ final String name = null;
}
« no previous file with comments | « third_party/mojo/src/mojo/public/dart/src/message_pipe.dart ('k') | third_party/mojo/src/mojo/public/dart/src/stub.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698