OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 library input_mojom; | 5 library input_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 | 10 |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 Map map = new Map(); | 123 Map map = new Map(); |
124 return map; | 124 return map; |
125 } | 125 } |
126 } | 126 } |
127 | 127 |
128 | 128 |
129 class _InputServiceSetClientParams extends bindings.Struct { | 129 class _InputServiceSetClientParams extends bindings.Struct { |
130 static const List<bindings.StructDataHeader> kVersions = const [ | 130 static const List<bindings.StructDataHeader> kVersions = const [ |
131 const bindings.StructDataHeader(16, 0) | 131 const bindings.StructDataHeader(16, 0) |
132 ]; | 132 ]; |
133 Object client = null; | 133 InputClientInterface client = null; |
134 | 134 |
135 _InputServiceSetClientParams() : super(kVersions.last.size); | 135 _InputServiceSetClientParams() : super(kVersions.last.size); |
136 | 136 |
137 static _InputServiceSetClientParams deserialize(bindings.Message message) { | 137 static _InputServiceSetClientParams deserialize(bindings.Message message) { |
138 var decoder = new bindings.Decoder(message); | 138 var decoder = new bindings.Decoder(message); |
139 var result = decode(decoder); | 139 var result = decode(decoder); |
140 if (decoder.excessHandles != null) { | 140 if (decoder.excessHandles != null) { |
141 decoder.excessHandles.forEach((h) => h.close()); | 141 decoder.excessHandles.forEach((h) => h.close()); |
142 } | 142 } |
143 return result; | 143 return result; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 | 204 |
205 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 205 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
206 responseFactory(null); | 206 responseFactory(null); |
207 | 207 |
208 dynamic getAllTypeDefinitions([Function responseFactory]) => | 208 dynamic getAllTypeDefinitions([Function responseFactory]) => |
209 responseFactory(null); | 209 responseFactory(null); |
210 } | 210 } |
211 | 211 |
212 abstract class InputClient { | 212 abstract class InputClient { |
213 static const String serviceName = null; | 213 static const String serviceName = null; |
| 214 |
| 215 static service_describer.ServiceDescription _cachedServiceDescription; |
| 216 static service_describer.ServiceDescription get serviceDescription { |
| 217 if (_cachedServiceDescription == null) { |
| 218 _cachedServiceDescription = new _InputClientServiceDescription(); |
| 219 } |
| 220 return _cachedServiceDescription; |
| 221 } |
| 222 |
| 223 static InputClientProxy connectToService( |
| 224 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 225 InputClientProxy p = new InputClientProxy.unbound(); |
| 226 String name = serviceName ?? InputClient.serviceName; |
| 227 if ((name == null) || name.isEmpty) { |
| 228 throw new core.MojoApiError( |
| 229 "If an interface has no ServiceName, then one must be provided."); |
| 230 } |
| 231 s.connectToService(url, p, name); |
| 232 return p; |
| 233 } |
214 dynamic onBackButton([Function responseFactory = null]); | 234 dynamic onBackButton([Function responseFactory = null]); |
215 } | 235 } |
216 | 236 |
| 237 abstract class InputClientInterface |
| 238 implements bindings.MojoInterface<InputClient>, |
| 239 InputClient { |
| 240 factory InputClientInterface([InputClient impl]) => |
| 241 new InputClientStub.unbound(impl); |
| 242 factory InputClientInterface.fromEndpoint( |
| 243 core.MojoMessagePipeEndpoint endpoint, |
| 244 [InputClient impl]) => |
| 245 new InputClientStub.fromEndpoint(endpoint, impl); |
| 246 } |
| 247 |
| 248 abstract class InputClientInterfaceRequest |
| 249 implements bindings.MojoInterface<InputClient>, |
| 250 InputClient { |
| 251 factory InputClientInterfaceRequest() => |
| 252 new InputClientProxy.unbound(); |
| 253 } |
| 254 |
217 class _InputClientProxyControl | 255 class _InputClientProxyControl |
218 extends bindings.ProxyMessageHandler | 256 extends bindings.ProxyMessageHandler |
219 implements bindings.ProxyControl { | 257 implements bindings.ProxyControl<InputClient> { |
220 _InputClientProxyControl.fromEndpoint( | 258 _InputClientProxyControl.fromEndpoint( |
221 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 259 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
222 | 260 |
223 _InputClientProxyControl.fromHandle( | 261 _InputClientProxyControl.fromHandle( |
224 core.MojoHandle handle) : super.fromHandle(handle); | 262 core.MojoHandle handle) : super.fromHandle(handle); |
225 | 263 |
226 _InputClientProxyControl.unbound() : super.unbound(); | 264 _InputClientProxyControl.unbound() : super.unbound(); |
227 | 265 |
228 service_describer.ServiceDescription get serviceDescription => | |
229 new _InputClientServiceDescription(); | |
230 | |
231 String get serviceName => InputClient.serviceName; | 266 String get serviceName => InputClient.serviceName; |
232 | 267 |
233 void handleResponse(bindings.ServiceMessage message) { | 268 void handleResponse(bindings.ServiceMessage message) { |
234 switch (message.header.type) { | 269 switch (message.header.type) { |
235 case _inputClientMethodOnBackButtonName: | 270 case _inputClientMethodOnBackButtonName: |
236 var r = InputClientOnBackButtonResponseParams.deserialize( | 271 var r = InputClientOnBackButtonResponseParams.deserialize( |
237 message.payload); | 272 message.payload); |
238 if (!message.header.hasRequestId) { | 273 if (!message.header.hasRequestId) { |
239 proxyError("Expected a message with a valid request Id."); | 274 proxyError("Expected a message with a valid request Id."); |
240 return; | 275 return; |
(...skipping 11 matching lines...) Expand all Loading... |
252 } | 287 } |
253 c.complete(r); | 288 c.complete(r); |
254 break; | 289 break; |
255 default: | 290 default: |
256 proxyError("Unexpected message type: ${message.header.type}"); | 291 proxyError("Unexpected message type: ${message.header.type}"); |
257 close(immediate: true); | 292 close(immediate: true); |
258 break; | 293 break; |
259 } | 294 } |
260 } | 295 } |
261 | 296 |
| 297 InputClient get impl => null; |
| 298 set impl(InputClient _) { |
| 299 throw new core.MojoApiError("The impl of a Proxy cannot be set."); |
| 300 } |
| 301 |
262 @override | 302 @override |
263 String toString() { | 303 String toString() { |
264 var superString = super.toString(); | 304 var superString = super.toString(); |
265 return "_InputClientProxyControl($superString)"; | 305 return "_InputClientProxyControl($superString)"; |
266 } | 306 } |
267 } | 307 } |
268 | 308 |
269 class InputClientProxy | 309 class InputClientProxy |
270 extends bindings.Proxy | 310 extends bindings.Proxy<InputClient> |
271 implements InputClient { | 311 implements InputClient, |
| 312 InputClientInterface, |
| 313 InputClientInterfaceRequest { |
272 InputClientProxy.fromEndpoint( | 314 InputClientProxy.fromEndpoint( |
273 core.MojoMessagePipeEndpoint endpoint) | 315 core.MojoMessagePipeEndpoint endpoint) |
274 : super(new _InputClientProxyControl.fromEndpoint(endpoint)); | 316 : super(new _InputClientProxyControl.fromEndpoint(endpoint)); |
275 | 317 |
276 InputClientProxy.fromHandle(core.MojoHandle handle) | 318 InputClientProxy.fromHandle(core.MojoHandle handle) |
277 : super(new _InputClientProxyControl.fromHandle(handle)); | 319 : super(new _InputClientProxyControl.fromHandle(handle)); |
278 | 320 |
279 InputClientProxy.unbound() | 321 InputClientProxy.unbound() |
280 : super(new _InputClientProxyControl.unbound()); | 322 : super(new _InputClientProxyControl.unbound()); |
281 | 323 |
282 static InputClientProxy newFromEndpoint( | 324 static InputClientProxy newFromEndpoint( |
283 core.MojoMessagePipeEndpoint endpoint) { | 325 core.MojoMessagePipeEndpoint endpoint) { |
284 assert(endpoint.setDescription("For InputClientProxy")); | 326 assert(endpoint.setDescription("For InputClientProxy")); |
285 return new InputClientProxy.fromEndpoint(endpoint); | 327 return new InputClientProxy.fromEndpoint(endpoint); |
286 } | 328 } |
287 | 329 |
288 factory InputClientProxy.connectToService( | |
289 bindings.ServiceConnector s, String url, [String serviceName]) { | |
290 InputClientProxy p = new InputClientProxy.unbound(); | |
291 s.connectToService(url, p, serviceName); | |
292 return p; | |
293 } | |
294 | |
295 | 330 |
296 dynamic onBackButton([Function responseFactory = null]) { | 331 dynamic onBackButton([Function responseFactory = null]) { |
297 var params = new _InputClientOnBackButtonParams(); | 332 var params = new _InputClientOnBackButtonParams(); |
298 return ctrl.sendMessageWithRequestId( | 333 return ctrl.sendMessageWithRequestId( |
299 params, | 334 params, |
300 _inputClientMethodOnBackButtonName, | 335 _inputClientMethodOnBackButtonName, |
301 -1, | 336 -1, |
302 bindings.MessageHeader.kMessageExpectsResponse); | 337 bindings.MessageHeader.kMessageExpectsResponse); |
303 } | 338 } |
304 } | 339 } |
(...skipping 10 matching lines...) Expand all Loading... |
315 } | 350 } |
316 | 351 |
317 _InputClientStubControl.fromHandle( | 352 _InputClientStubControl.fromHandle( |
318 core.MojoHandle handle, [InputClient impl]) | 353 core.MojoHandle handle, [InputClient impl]) |
319 : super.fromHandle(handle, autoBegin: impl != null) { | 354 : super.fromHandle(handle, autoBegin: impl != null) { |
320 _impl = impl; | 355 _impl = impl; |
321 } | 356 } |
322 | 357 |
323 _InputClientStubControl.unbound([this._impl]) : super.unbound(); | 358 _InputClientStubControl.unbound([this._impl]) : super.unbound(); |
324 | 359 |
| 360 String get serviceName => InputClient.serviceName; |
| 361 |
325 | 362 |
326 InputClientOnBackButtonResponseParams _inputClientOnBackButtonResponseParamsFa
ctory() { | 363 InputClientOnBackButtonResponseParams _inputClientOnBackButtonResponseParamsFa
ctory() { |
327 var result = new InputClientOnBackButtonResponseParams(); | 364 var result = new InputClientOnBackButtonResponseParams(); |
328 return result; | 365 return result; |
329 } | 366 } |
330 | 367 |
331 dynamic handleMessage(bindings.ServiceMessage message) { | 368 dynamic handleMessage(bindings.ServiceMessage message) { |
332 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 369 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
333 return bindings.ControlMessageHandler.handleMessage(this, | 370 return bindings.ControlMessageHandler.handleMessage(this, |
334 0, | 371 0, |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 } | 421 } |
385 } | 422 } |
386 | 423 |
387 @override | 424 @override |
388 String toString() { | 425 String toString() { |
389 var superString = super.toString(); | 426 var superString = super.toString(); |
390 return "_InputClientStubControl($superString)"; | 427 return "_InputClientStubControl($superString)"; |
391 } | 428 } |
392 | 429 |
393 int get version => 0; | 430 int get version => 0; |
394 | |
395 static service_describer.ServiceDescription _cachedServiceDescription; | |
396 static service_describer.ServiceDescription get serviceDescription { | |
397 if (_cachedServiceDescription == null) { | |
398 _cachedServiceDescription = new _InputClientServiceDescription(); | |
399 } | |
400 return _cachedServiceDescription; | |
401 } | |
402 } | 431 } |
403 | 432 |
404 class InputClientStub | 433 class InputClientStub |
405 extends bindings.Stub<InputClient> | 434 extends bindings.Stub<InputClient> |
406 implements InputClient { | 435 implements InputClient, |
| 436 InputClientInterface, |
| 437 InputClientInterfaceRequest { |
| 438 InputClientStub.unbound([InputClient impl]) |
| 439 : super(new _InputClientStubControl.unbound(impl)); |
| 440 |
407 InputClientStub.fromEndpoint( | 441 InputClientStub.fromEndpoint( |
408 core.MojoMessagePipeEndpoint endpoint, [InputClient impl]) | 442 core.MojoMessagePipeEndpoint endpoint, [InputClient impl]) |
409 : super(new _InputClientStubControl.fromEndpoint(endpoint, impl)); | 443 : super(new _InputClientStubControl.fromEndpoint(endpoint, impl)); |
410 | 444 |
411 InputClientStub.fromHandle( | 445 InputClientStub.fromHandle( |
412 core.MojoHandle handle, [InputClient impl]) | 446 core.MojoHandle handle, [InputClient impl]) |
413 : super(new _InputClientStubControl.fromHandle(handle, impl)); | 447 : super(new _InputClientStubControl.fromHandle(handle, impl)); |
414 | 448 |
415 InputClientStub.unbound([InputClient impl]) | |
416 : super(new _InputClientStubControl.unbound(impl)); | |
417 | |
418 static InputClientStub newFromEndpoint( | 449 static InputClientStub newFromEndpoint( |
419 core.MojoMessagePipeEndpoint endpoint) { | 450 core.MojoMessagePipeEndpoint endpoint) { |
420 assert(endpoint.setDescription("For InputClientStub")); | 451 assert(endpoint.setDescription("For InputClientStub")); |
421 return new InputClientStub.fromEndpoint(endpoint); | 452 return new InputClientStub.fromEndpoint(endpoint); |
422 } | 453 } |
423 | 454 |
424 static service_describer.ServiceDescription get serviceDescription => | |
425 _InputClientStubControl.serviceDescription; | |
426 | |
427 | 455 |
428 dynamic onBackButton([Function responseFactory = null]) { | 456 dynamic onBackButton([Function responseFactory = null]) { |
429 return impl.onBackButton(responseFactory); | 457 return impl.onBackButton(responseFactory); |
430 } | 458 } |
431 } | 459 } |
432 | 460 |
433 const int _inputServiceMethodSetClientName = 0; | 461 const int _inputServiceMethodSetClientName = 0; |
434 | 462 |
435 class _InputServiceServiceDescription implements service_describer.ServiceDescri
ption { | 463 class _InputServiceServiceDescription implements service_describer.ServiceDescri
ption { |
436 dynamic getTopLevelInterface([Function responseFactory]) => | 464 dynamic getTopLevelInterface([Function responseFactory]) => |
437 responseFactory(null); | 465 responseFactory(null); |
438 | 466 |
439 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 467 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
440 responseFactory(null); | 468 responseFactory(null); |
441 | 469 |
442 dynamic getAllTypeDefinitions([Function responseFactory]) => | 470 dynamic getAllTypeDefinitions([Function responseFactory]) => |
443 responseFactory(null); | 471 responseFactory(null); |
444 } | 472 } |
445 | 473 |
446 abstract class InputService { | 474 abstract class InputService { |
447 static const String serviceName = "input::InputService"; | 475 static const String serviceName = "input::InputService"; |
448 void setClient(Object client); | 476 |
| 477 static service_describer.ServiceDescription _cachedServiceDescription; |
| 478 static service_describer.ServiceDescription get serviceDescription { |
| 479 if (_cachedServiceDescription == null) { |
| 480 _cachedServiceDescription = new _InputServiceServiceDescription(); |
| 481 } |
| 482 return _cachedServiceDescription; |
| 483 } |
| 484 |
| 485 static InputServiceProxy connectToService( |
| 486 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 487 InputServiceProxy p = new InputServiceProxy.unbound(); |
| 488 String name = serviceName ?? InputService.serviceName; |
| 489 if ((name == null) || name.isEmpty) { |
| 490 throw new core.MojoApiError( |
| 491 "If an interface has no ServiceName, then one must be provided."); |
| 492 } |
| 493 s.connectToService(url, p, name); |
| 494 return p; |
| 495 } |
| 496 void setClient(InputClientInterface client); |
| 497 } |
| 498 |
| 499 abstract class InputServiceInterface |
| 500 implements bindings.MojoInterface<InputService>, |
| 501 InputService { |
| 502 factory InputServiceInterface([InputService impl]) => |
| 503 new InputServiceStub.unbound(impl); |
| 504 factory InputServiceInterface.fromEndpoint( |
| 505 core.MojoMessagePipeEndpoint endpoint, |
| 506 [InputService impl]) => |
| 507 new InputServiceStub.fromEndpoint(endpoint, impl); |
| 508 } |
| 509 |
| 510 abstract class InputServiceInterfaceRequest |
| 511 implements bindings.MojoInterface<InputService>, |
| 512 InputService { |
| 513 factory InputServiceInterfaceRequest() => |
| 514 new InputServiceProxy.unbound(); |
449 } | 515 } |
450 | 516 |
451 class _InputServiceProxyControl | 517 class _InputServiceProxyControl |
452 extends bindings.ProxyMessageHandler | 518 extends bindings.ProxyMessageHandler |
453 implements bindings.ProxyControl { | 519 implements bindings.ProxyControl<InputService> { |
454 _InputServiceProxyControl.fromEndpoint( | 520 _InputServiceProxyControl.fromEndpoint( |
455 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 521 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
456 | 522 |
457 _InputServiceProxyControl.fromHandle( | 523 _InputServiceProxyControl.fromHandle( |
458 core.MojoHandle handle) : super.fromHandle(handle); | 524 core.MojoHandle handle) : super.fromHandle(handle); |
459 | 525 |
460 _InputServiceProxyControl.unbound() : super.unbound(); | 526 _InputServiceProxyControl.unbound() : super.unbound(); |
461 | 527 |
462 service_describer.ServiceDescription get serviceDescription => | |
463 new _InputServiceServiceDescription(); | |
464 | |
465 String get serviceName => InputService.serviceName; | 528 String get serviceName => InputService.serviceName; |
466 | 529 |
467 void handleResponse(bindings.ServiceMessage message) { | 530 void handleResponse(bindings.ServiceMessage message) { |
468 switch (message.header.type) { | 531 switch (message.header.type) { |
469 default: | 532 default: |
470 proxyError("Unexpected message type: ${message.header.type}"); | 533 proxyError("Unexpected message type: ${message.header.type}"); |
471 close(immediate: true); | 534 close(immediate: true); |
472 break; | 535 break; |
473 } | 536 } |
474 } | 537 } |
475 | 538 |
| 539 InputService get impl => null; |
| 540 set impl(InputService _) { |
| 541 throw new core.MojoApiError("The impl of a Proxy cannot be set."); |
| 542 } |
| 543 |
476 @override | 544 @override |
477 String toString() { | 545 String toString() { |
478 var superString = super.toString(); | 546 var superString = super.toString(); |
479 return "_InputServiceProxyControl($superString)"; | 547 return "_InputServiceProxyControl($superString)"; |
480 } | 548 } |
481 } | 549 } |
482 | 550 |
483 class InputServiceProxy | 551 class InputServiceProxy |
484 extends bindings.Proxy | 552 extends bindings.Proxy<InputService> |
485 implements InputService { | 553 implements InputService, |
| 554 InputServiceInterface, |
| 555 InputServiceInterfaceRequest { |
486 InputServiceProxy.fromEndpoint( | 556 InputServiceProxy.fromEndpoint( |
487 core.MojoMessagePipeEndpoint endpoint) | 557 core.MojoMessagePipeEndpoint endpoint) |
488 : super(new _InputServiceProxyControl.fromEndpoint(endpoint)); | 558 : super(new _InputServiceProxyControl.fromEndpoint(endpoint)); |
489 | 559 |
490 InputServiceProxy.fromHandle(core.MojoHandle handle) | 560 InputServiceProxy.fromHandle(core.MojoHandle handle) |
491 : super(new _InputServiceProxyControl.fromHandle(handle)); | 561 : super(new _InputServiceProxyControl.fromHandle(handle)); |
492 | 562 |
493 InputServiceProxy.unbound() | 563 InputServiceProxy.unbound() |
494 : super(new _InputServiceProxyControl.unbound()); | 564 : super(new _InputServiceProxyControl.unbound()); |
495 | 565 |
496 static InputServiceProxy newFromEndpoint( | 566 static InputServiceProxy newFromEndpoint( |
497 core.MojoMessagePipeEndpoint endpoint) { | 567 core.MojoMessagePipeEndpoint endpoint) { |
498 assert(endpoint.setDescription("For InputServiceProxy")); | 568 assert(endpoint.setDescription("For InputServiceProxy")); |
499 return new InputServiceProxy.fromEndpoint(endpoint); | 569 return new InputServiceProxy.fromEndpoint(endpoint); |
500 } | 570 } |
501 | 571 |
502 factory InputServiceProxy.connectToService( | |
503 bindings.ServiceConnector s, String url, [String serviceName]) { | |
504 InputServiceProxy p = new InputServiceProxy.unbound(); | |
505 s.connectToService(url, p, serviceName); | |
506 return p; | |
507 } | |
508 | 572 |
509 | 573 void setClient(InputClientInterface client) { |
510 void setClient(Object client) { | |
511 if (!ctrl.isBound) { | 574 if (!ctrl.isBound) { |
512 ctrl.proxyError("The Proxy is closed."); | 575 ctrl.proxyError("The Proxy is closed."); |
513 return; | 576 return; |
514 } | 577 } |
515 var params = new _InputServiceSetClientParams(); | 578 var params = new _InputServiceSetClientParams(); |
516 params.client = client; | 579 params.client = client; |
517 ctrl.sendMessage(params, | 580 ctrl.sendMessage(params, |
518 _inputServiceMethodSetClientName); | 581 _inputServiceMethodSetClientName); |
519 } | 582 } |
520 } | 583 } |
(...skipping 10 matching lines...) Expand all Loading... |
531 } | 594 } |
532 | 595 |
533 _InputServiceStubControl.fromHandle( | 596 _InputServiceStubControl.fromHandle( |
534 core.MojoHandle handle, [InputService impl]) | 597 core.MojoHandle handle, [InputService impl]) |
535 : super.fromHandle(handle, autoBegin: impl != null) { | 598 : super.fromHandle(handle, autoBegin: impl != null) { |
536 _impl = impl; | 599 _impl = impl; |
537 } | 600 } |
538 | 601 |
539 _InputServiceStubControl.unbound([this._impl]) : super.unbound(); | 602 _InputServiceStubControl.unbound([this._impl]) : super.unbound(); |
540 | 603 |
| 604 String get serviceName => InputService.serviceName; |
| 605 |
541 | 606 |
542 | 607 |
543 dynamic handleMessage(bindings.ServiceMessage message) { | 608 dynamic handleMessage(bindings.ServiceMessage message) { |
544 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 609 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
545 return bindings.ControlMessageHandler.handleMessage(this, | 610 return bindings.ControlMessageHandler.handleMessage(this, |
546 0, | 611 0, |
547 message); | 612 message); |
548 } | 613 } |
549 if (_impl == null) { | 614 if (_impl == null) { |
550 throw new core.MojoApiError("$this has no implementation set"); | 615 throw new core.MojoApiError("$this has no implementation set"); |
(...skipping 30 matching lines...) Expand all Loading... |
581 } | 646 } |
582 } | 647 } |
583 | 648 |
584 @override | 649 @override |
585 String toString() { | 650 String toString() { |
586 var superString = super.toString(); | 651 var superString = super.toString(); |
587 return "_InputServiceStubControl($superString)"; | 652 return "_InputServiceStubControl($superString)"; |
588 } | 653 } |
589 | 654 |
590 int get version => 0; | 655 int get version => 0; |
591 | |
592 static service_describer.ServiceDescription _cachedServiceDescription; | |
593 static service_describer.ServiceDescription get serviceDescription { | |
594 if (_cachedServiceDescription == null) { | |
595 _cachedServiceDescription = new _InputServiceServiceDescription(); | |
596 } | |
597 return _cachedServiceDescription; | |
598 } | |
599 } | 656 } |
600 | 657 |
601 class InputServiceStub | 658 class InputServiceStub |
602 extends bindings.Stub<InputService> | 659 extends bindings.Stub<InputService> |
603 implements InputService { | 660 implements InputService, |
| 661 InputServiceInterface, |
| 662 InputServiceInterfaceRequest { |
| 663 InputServiceStub.unbound([InputService impl]) |
| 664 : super(new _InputServiceStubControl.unbound(impl)); |
| 665 |
604 InputServiceStub.fromEndpoint( | 666 InputServiceStub.fromEndpoint( |
605 core.MojoMessagePipeEndpoint endpoint, [InputService impl]) | 667 core.MojoMessagePipeEndpoint endpoint, [InputService impl]) |
606 : super(new _InputServiceStubControl.fromEndpoint(endpoint, impl)); | 668 : super(new _InputServiceStubControl.fromEndpoint(endpoint, impl)); |
607 | 669 |
608 InputServiceStub.fromHandle( | 670 InputServiceStub.fromHandle( |
609 core.MojoHandle handle, [InputService impl]) | 671 core.MojoHandle handle, [InputService impl]) |
610 : super(new _InputServiceStubControl.fromHandle(handle, impl)); | 672 : super(new _InputServiceStubControl.fromHandle(handle, impl)); |
611 | 673 |
612 InputServiceStub.unbound([InputService impl]) | |
613 : super(new _InputServiceStubControl.unbound(impl)); | |
614 | |
615 static InputServiceStub newFromEndpoint( | 674 static InputServiceStub newFromEndpoint( |
616 core.MojoMessagePipeEndpoint endpoint) { | 675 core.MojoMessagePipeEndpoint endpoint) { |
617 assert(endpoint.setDescription("For InputServiceStub")); | 676 assert(endpoint.setDescription("For InputServiceStub")); |
618 return new InputServiceStub.fromEndpoint(endpoint); | 677 return new InputServiceStub.fromEndpoint(endpoint); |
619 } | 678 } |
620 | 679 |
621 static service_describer.ServiceDescription get serviceDescription => | |
622 _InputServiceStubControl.serviceDescription; | |
623 | 680 |
624 | 681 void setClient(InputClientInterface client) { |
625 void setClient(Object client) { | |
626 return impl.setClient(client); | 682 return impl.setClient(client); |
627 } | 683 } |
628 } | 684 } |
629 | 685 |
630 | 686 |
631 | 687 |
OLD | NEW |