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

Side by Side Diff: mojo/dart/packages/mojo_services/lib/mojo/tcp_connected_socket.mojom.dart

Issue 2006093002: Dart: Futures -> Callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // WARNING: DO NOT EDIT. This file was generated by a program. 1 // WARNING: DO NOT EDIT. This file was generated by a program.
2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py. 2 // See $MOJO_SDK/tools/bindings/mojom_bindings_generator.py.
3 3
4 library tcp_connected_socket_mojom; 4 library tcp_connected_socket_mojom;
5 import 'dart:async'; 5 import 'dart:async';
6 import 'package:mojo/bindings.dart' as bindings; 6 import 'package:mojo/bindings.dart' as bindings;
7 import 'package:mojo/core.dart' as core; 7 import 'package:mojo/core.dart' as core;
8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer; 8 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic e_describer;
9 9
10 10
11 11
12 class _TcpConnectedSocketServiceDescription implements service_describer.Service Description { 12 class _TcpConnectedSocketServiceDescription implements service_describer.Service Description {
13 dynamic getTopLevelInterface([Function responseFactory]) => 13 void getTopLevelInterface(Function responder) {
14 responseFactory(null); 14 responder(null);
15 }
15 16
16 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 17 void getTypeDefinition(String typeKey, Function responder) {
17 responseFactory(null); 18 responder(null);
19 }
18 20
19 dynamic getAllTypeDefinitions([Function responseFactory]) => 21 void getAllTypeDefinitions(Function responder) {
20 responseFactory(null); 22 responder(null);
23 }
21 } 24 }
22 25
23 abstract class TcpConnectedSocket { 26 abstract class TcpConnectedSocket {
24 static const String serviceName = null; 27 static const String serviceName = null;
25 28
26 static service_describer.ServiceDescription _cachedServiceDescription; 29 static service_describer.ServiceDescription _cachedServiceDescription;
27 static service_describer.ServiceDescription get serviceDescription { 30 static service_describer.ServiceDescription get serviceDescription {
28 if (_cachedServiceDescription == null) { 31 if (_cachedServiceDescription == null) {
29 _cachedServiceDescription = new _TcpConnectedSocketServiceDescription(); 32 _cachedServiceDescription = new _TcpConnectedSocketServiceDescription();
30 } 33 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 : super.fromHandle(handle, autoBegin: impl != null) { 148 : super.fromHandle(handle, autoBegin: impl != null) {
146 _impl = impl; 149 _impl = impl;
147 } 150 }
148 151
149 _TcpConnectedSocketStubControl.unbound([this._impl]) : super.unbound(); 152 _TcpConnectedSocketStubControl.unbound([this._impl]) : super.unbound();
150 153
151 String get serviceName => TcpConnectedSocket.serviceName; 154 String get serviceName => TcpConnectedSocket.serviceName;
152 155
153 156
154 157
155 dynamic handleMessage(bindings.ServiceMessage message) { 158 void handleMessage(bindings.ServiceMessage message) {
156 if (bindings.ControlMessageHandler.isControlMessage(message)) { 159 if (bindings.ControlMessageHandler.isControlMessage(message)) {
157 return bindings.ControlMessageHandler.handleMessage(this, 160 bindings.ControlMessageHandler.handleMessage(
158 0, 161 this, 0, message);
159 message); 162 return;
160 } 163 }
161 if (_impl == null) { 164 if (_impl == null) {
162 throw new core.MojoApiError("$this has no implementation set"); 165 throw new core.MojoApiError("$this has no implementation set");
163 } 166 }
164 switch (message.header.type) { 167 switch (message.header.type) {
165 default: 168 default:
166 throw new bindings.MojoCodecError("Unexpected message name"); 169 throw new bindings.MojoCodecError("Unexpected message name");
167 break; 170 break;
168 } 171 }
169 return null;
170 } 172 }
171 173
172 TcpConnectedSocket get impl => _impl; 174 TcpConnectedSocket get impl => _impl;
173 set impl(TcpConnectedSocket d) { 175 set impl(TcpConnectedSocket d) {
174 if (d == null) { 176 if (d == null) {
175 throw new core.MojoApiError("$this: Cannot set a null implementation"); 177 throw new core.MojoApiError("$this: Cannot set a null implementation");
176 } 178 }
177 if (isBound && (_impl == null)) { 179 if (isBound && (_impl == null)) {
178 beginHandlingEvents(); 180 beginHandlingEvents();
179 } 181 }
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 core.MojoMessagePipeEndpoint endpoint) { 219 core.MojoMessagePipeEndpoint endpoint) {
218 assert(endpoint.setDescription("For TcpConnectedSocketStub")); 220 assert(endpoint.setDescription("For TcpConnectedSocketStub"));
219 return new TcpConnectedSocketStub.fromEndpoint(endpoint); 221 return new TcpConnectedSocketStub.fromEndpoint(endpoint);
220 } 222 }
221 223
222 224
223 } 225 }
224 226
225 227
226 228
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698