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_connection_mojom; | 5 library input_connection_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 import 'package:mojo_services/mojo/input_events.mojom.dart' as input_events_mojo
m; | 10 import 'package:mojo_services/mojo/input_events.mojom.dart' as input_events_mojo
m; |
11 | 11 |
12 | 12 |
13 | 13 |
14 class _InputConnectionSetListenerParams extends bindings.Struct { | 14 class _InputConnectionSetListenerParams extends bindings.Struct { |
15 static const List<bindings.StructDataHeader> kVersions = const [ | 15 static const List<bindings.StructDataHeader> kVersions = const [ |
16 const bindings.StructDataHeader(16, 0) | 16 const bindings.StructDataHeader(16, 0) |
17 ]; | 17 ]; |
18 Object listener = null; | 18 InputListenerInterface listener = null; |
19 | 19 |
20 _InputConnectionSetListenerParams() : super(kVersions.last.size); | 20 _InputConnectionSetListenerParams() : super(kVersions.last.size); |
21 | 21 |
22 static _InputConnectionSetListenerParams deserialize(bindings.Message message)
{ | 22 static _InputConnectionSetListenerParams deserialize(bindings.Message message)
{ |
23 var decoder = new bindings.Decoder(message); | 23 var decoder = new bindings.Decoder(message); |
24 var result = decode(decoder); | 24 var result = decode(decoder); |
25 if (decoder.excessHandles != null) { | 25 if (decoder.excessHandles != null) { |
26 decoder.excessHandles.forEach((h) => h.close()); | 26 decoder.excessHandles.forEach((h) => h.close()); |
27 } | 27 } |
28 return result; | 28 return result; |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 | 234 |
235 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 235 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
236 responseFactory(null); | 236 responseFactory(null); |
237 | 237 |
238 dynamic getAllTypeDefinitions([Function responseFactory]) => | 238 dynamic getAllTypeDefinitions([Function responseFactory]) => |
239 responseFactory(null); | 239 responseFactory(null); |
240 } | 240 } |
241 | 241 |
242 abstract class InputConnection { | 242 abstract class InputConnection { |
243 static const String serviceName = "mojo::ui::InputConnection"; | 243 static const String serviceName = "mojo::ui::InputConnection"; |
244 void setListener(Object listener); | 244 |
| 245 static service_describer.ServiceDescription _cachedServiceDescription; |
| 246 static service_describer.ServiceDescription get serviceDescription { |
| 247 if (_cachedServiceDescription == null) { |
| 248 _cachedServiceDescription = new _InputConnectionServiceDescription(); |
| 249 } |
| 250 return _cachedServiceDescription; |
| 251 } |
| 252 |
| 253 static InputConnectionProxy connectToService( |
| 254 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 255 InputConnectionProxy p = new InputConnectionProxy.unbound(); |
| 256 String name = serviceName ?? InputConnection.serviceName; |
| 257 if ((name == null) || name.isEmpty) { |
| 258 throw new core.MojoApiError( |
| 259 "If an interface has no ServiceName, then one must be provided."); |
| 260 } |
| 261 s.connectToService(url, p, name); |
| 262 return p; |
| 263 } |
| 264 void setListener(InputListenerInterface listener); |
| 265 } |
| 266 |
| 267 abstract class InputConnectionInterface |
| 268 implements bindings.MojoInterface<InputConnection>, |
| 269 InputConnection { |
| 270 factory InputConnectionInterface([InputConnection impl]) => |
| 271 new InputConnectionStub.unbound(impl); |
| 272 factory InputConnectionInterface.fromEndpoint( |
| 273 core.MojoMessagePipeEndpoint endpoint, |
| 274 [InputConnection impl]) => |
| 275 new InputConnectionStub.fromEndpoint(endpoint, impl); |
| 276 } |
| 277 |
| 278 abstract class InputConnectionInterfaceRequest |
| 279 implements bindings.MojoInterface<InputConnection>, |
| 280 InputConnection { |
| 281 factory InputConnectionInterfaceRequest() => |
| 282 new InputConnectionProxy.unbound(); |
245 } | 283 } |
246 | 284 |
247 class _InputConnectionProxyControl | 285 class _InputConnectionProxyControl |
248 extends bindings.ProxyMessageHandler | 286 extends bindings.ProxyMessageHandler |
249 implements bindings.ProxyControl { | 287 implements bindings.ProxyControl<InputConnection> { |
250 _InputConnectionProxyControl.fromEndpoint( | 288 _InputConnectionProxyControl.fromEndpoint( |
251 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 289 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
252 | 290 |
253 _InputConnectionProxyControl.fromHandle( | 291 _InputConnectionProxyControl.fromHandle( |
254 core.MojoHandle handle) : super.fromHandle(handle); | 292 core.MojoHandle handle) : super.fromHandle(handle); |
255 | 293 |
256 _InputConnectionProxyControl.unbound() : super.unbound(); | 294 _InputConnectionProxyControl.unbound() : super.unbound(); |
257 | 295 |
258 service_describer.ServiceDescription get serviceDescription => | |
259 new _InputConnectionServiceDescription(); | |
260 | |
261 String get serviceName => InputConnection.serviceName; | 296 String get serviceName => InputConnection.serviceName; |
262 | 297 |
263 void handleResponse(bindings.ServiceMessage message) { | 298 void handleResponse(bindings.ServiceMessage message) { |
264 switch (message.header.type) { | 299 switch (message.header.type) { |
265 default: | 300 default: |
266 proxyError("Unexpected message type: ${message.header.type}"); | 301 proxyError("Unexpected message type: ${message.header.type}"); |
267 close(immediate: true); | 302 close(immediate: true); |
268 break; | 303 break; |
269 } | 304 } |
270 } | 305 } |
271 | 306 |
| 307 InputConnection get impl => null; |
| 308 set impl(InputConnection _) { |
| 309 throw new core.MojoApiError("The impl of a Proxy cannot be set."); |
| 310 } |
| 311 |
272 @override | 312 @override |
273 String toString() { | 313 String toString() { |
274 var superString = super.toString(); | 314 var superString = super.toString(); |
275 return "_InputConnectionProxyControl($superString)"; | 315 return "_InputConnectionProxyControl($superString)"; |
276 } | 316 } |
277 } | 317 } |
278 | 318 |
279 class InputConnectionProxy | 319 class InputConnectionProxy |
280 extends bindings.Proxy | 320 extends bindings.Proxy<InputConnection> |
281 implements InputConnection { | 321 implements InputConnection, |
| 322 InputConnectionInterface, |
| 323 InputConnectionInterfaceRequest { |
282 InputConnectionProxy.fromEndpoint( | 324 InputConnectionProxy.fromEndpoint( |
283 core.MojoMessagePipeEndpoint endpoint) | 325 core.MojoMessagePipeEndpoint endpoint) |
284 : super(new _InputConnectionProxyControl.fromEndpoint(endpoint)); | 326 : super(new _InputConnectionProxyControl.fromEndpoint(endpoint)); |
285 | 327 |
286 InputConnectionProxy.fromHandle(core.MojoHandle handle) | 328 InputConnectionProxy.fromHandle(core.MojoHandle handle) |
287 : super(new _InputConnectionProxyControl.fromHandle(handle)); | 329 : super(new _InputConnectionProxyControl.fromHandle(handle)); |
288 | 330 |
289 InputConnectionProxy.unbound() | 331 InputConnectionProxy.unbound() |
290 : super(new _InputConnectionProxyControl.unbound()); | 332 : super(new _InputConnectionProxyControl.unbound()); |
291 | 333 |
292 static InputConnectionProxy newFromEndpoint( | 334 static InputConnectionProxy newFromEndpoint( |
293 core.MojoMessagePipeEndpoint endpoint) { | 335 core.MojoMessagePipeEndpoint endpoint) { |
294 assert(endpoint.setDescription("For InputConnectionProxy")); | 336 assert(endpoint.setDescription("For InputConnectionProxy")); |
295 return new InputConnectionProxy.fromEndpoint(endpoint); | 337 return new InputConnectionProxy.fromEndpoint(endpoint); |
296 } | 338 } |
297 | 339 |
298 factory InputConnectionProxy.connectToService( | |
299 bindings.ServiceConnector s, String url, [String serviceName]) { | |
300 InputConnectionProxy p = new InputConnectionProxy.unbound(); | |
301 s.connectToService(url, p, serviceName); | |
302 return p; | |
303 } | |
304 | 340 |
305 | 341 void setListener(InputListenerInterface listener) { |
306 void setListener(Object listener) { | |
307 if (!ctrl.isBound) { | 342 if (!ctrl.isBound) { |
308 ctrl.proxyError("The Proxy is closed."); | 343 ctrl.proxyError("The Proxy is closed."); |
309 return; | 344 return; |
310 } | 345 } |
311 var params = new _InputConnectionSetListenerParams(); | 346 var params = new _InputConnectionSetListenerParams(); |
312 params.listener = listener; | 347 params.listener = listener; |
313 ctrl.sendMessage(params, | 348 ctrl.sendMessage(params, |
314 _inputConnectionMethodSetListenerName); | 349 _inputConnectionMethodSetListenerName); |
315 } | 350 } |
316 } | 351 } |
(...skipping 10 matching lines...) Expand all Loading... |
327 } | 362 } |
328 | 363 |
329 _InputConnectionStubControl.fromHandle( | 364 _InputConnectionStubControl.fromHandle( |
330 core.MojoHandle handle, [InputConnection impl]) | 365 core.MojoHandle handle, [InputConnection impl]) |
331 : super.fromHandle(handle, autoBegin: impl != null) { | 366 : super.fromHandle(handle, autoBegin: impl != null) { |
332 _impl = impl; | 367 _impl = impl; |
333 } | 368 } |
334 | 369 |
335 _InputConnectionStubControl.unbound([this._impl]) : super.unbound(); | 370 _InputConnectionStubControl.unbound([this._impl]) : super.unbound(); |
336 | 371 |
| 372 String get serviceName => InputConnection.serviceName; |
| 373 |
337 | 374 |
338 | 375 |
339 dynamic handleMessage(bindings.ServiceMessage message) { | 376 dynamic handleMessage(bindings.ServiceMessage message) { |
340 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 377 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
341 return bindings.ControlMessageHandler.handleMessage(this, | 378 return bindings.ControlMessageHandler.handleMessage(this, |
342 0, | 379 0, |
343 message); | 380 message); |
344 } | 381 } |
345 if (_impl == null) { | 382 if (_impl == null) { |
346 throw new core.MojoApiError("$this has no implementation set"); | 383 throw new core.MojoApiError("$this has no implementation set"); |
(...skipping 30 matching lines...) Expand all Loading... |
377 } | 414 } |
378 } | 415 } |
379 | 416 |
380 @override | 417 @override |
381 String toString() { | 418 String toString() { |
382 var superString = super.toString(); | 419 var superString = super.toString(); |
383 return "_InputConnectionStubControl($superString)"; | 420 return "_InputConnectionStubControl($superString)"; |
384 } | 421 } |
385 | 422 |
386 int get version => 0; | 423 int get version => 0; |
387 | |
388 static service_describer.ServiceDescription _cachedServiceDescription; | |
389 static service_describer.ServiceDescription get serviceDescription { | |
390 if (_cachedServiceDescription == null) { | |
391 _cachedServiceDescription = new _InputConnectionServiceDescription(); | |
392 } | |
393 return _cachedServiceDescription; | |
394 } | |
395 } | 424 } |
396 | 425 |
397 class InputConnectionStub | 426 class InputConnectionStub |
398 extends bindings.Stub<InputConnection> | 427 extends bindings.Stub<InputConnection> |
399 implements InputConnection { | 428 implements InputConnection, |
| 429 InputConnectionInterface, |
| 430 InputConnectionInterfaceRequest { |
| 431 InputConnectionStub.unbound([InputConnection impl]) |
| 432 : super(new _InputConnectionStubControl.unbound(impl)); |
| 433 |
400 InputConnectionStub.fromEndpoint( | 434 InputConnectionStub.fromEndpoint( |
401 core.MojoMessagePipeEndpoint endpoint, [InputConnection impl]) | 435 core.MojoMessagePipeEndpoint endpoint, [InputConnection impl]) |
402 : super(new _InputConnectionStubControl.fromEndpoint(endpoint, impl)); | 436 : super(new _InputConnectionStubControl.fromEndpoint(endpoint, impl)); |
403 | 437 |
404 InputConnectionStub.fromHandle( | 438 InputConnectionStub.fromHandle( |
405 core.MojoHandle handle, [InputConnection impl]) | 439 core.MojoHandle handle, [InputConnection impl]) |
406 : super(new _InputConnectionStubControl.fromHandle(handle, impl)); | 440 : super(new _InputConnectionStubControl.fromHandle(handle, impl)); |
407 | 441 |
408 InputConnectionStub.unbound([InputConnection impl]) | |
409 : super(new _InputConnectionStubControl.unbound(impl)); | |
410 | |
411 static InputConnectionStub newFromEndpoint( | 442 static InputConnectionStub newFromEndpoint( |
412 core.MojoMessagePipeEndpoint endpoint) { | 443 core.MojoMessagePipeEndpoint endpoint) { |
413 assert(endpoint.setDescription("For InputConnectionStub")); | 444 assert(endpoint.setDescription("For InputConnectionStub")); |
414 return new InputConnectionStub.fromEndpoint(endpoint); | 445 return new InputConnectionStub.fromEndpoint(endpoint); |
415 } | 446 } |
416 | 447 |
417 static service_describer.ServiceDescription get serviceDescription => | |
418 _InputConnectionStubControl.serviceDescription; | |
419 | 448 |
420 | 449 void setListener(InputListenerInterface listener) { |
421 void setListener(Object listener) { | |
422 return impl.setListener(listener); | 450 return impl.setListener(listener); |
423 } | 451 } |
424 } | 452 } |
425 | 453 |
426 const int _inputListenerMethodOnEventName = 0; | 454 const int _inputListenerMethodOnEventName = 0; |
427 | 455 |
428 class _InputListenerServiceDescription implements service_describer.ServiceDescr
iption { | 456 class _InputListenerServiceDescription implements service_describer.ServiceDescr
iption { |
429 dynamic getTopLevelInterface([Function responseFactory]) => | 457 dynamic getTopLevelInterface([Function responseFactory]) => |
430 responseFactory(null); | 458 responseFactory(null); |
431 | 459 |
432 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 460 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
433 responseFactory(null); | 461 responseFactory(null); |
434 | 462 |
435 dynamic getAllTypeDefinitions([Function responseFactory]) => | 463 dynamic getAllTypeDefinitions([Function responseFactory]) => |
436 responseFactory(null); | 464 responseFactory(null); |
437 } | 465 } |
438 | 466 |
439 abstract class InputListener { | 467 abstract class InputListener { |
440 static const String serviceName = null; | 468 static const String serviceName = null; |
| 469 |
| 470 static service_describer.ServiceDescription _cachedServiceDescription; |
| 471 static service_describer.ServiceDescription get serviceDescription { |
| 472 if (_cachedServiceDescription == null) { |
| 473 _cachedServiceDescription = new _InputListenerServiceDescription(); |
| 474 } |
| 475 return _cachedServiceDescription; |
| 476 } |
| 477 |
| 478 static InputListenerProxy connectToService( |
| 479 bindings.ServiceConnector s, String url, [String serviceName]) { |
| 480 InputListenerProxy p = new InputListenerProxy.unbound(); |
| 481 String name = serviceName ?? InputListener.serviceName; |
| 482 if ((name == null) || name.isEmpty) { |
| 483 throw new core.MojoApiError( |
| 484 "If an interface has no ServiceName, then one must be provided."); |
| 485 } |
| 486 s.connectToService(url, p, name); |
| 487 return p; |
| 488 } |
441 dynamic onEvent(input_events_mojom.Event event,[Function responseFactory = nul
l]); | 489 dynamic onEvent(input_events_mojom.Event event,[Function responseFactory = nul
l]); |
442 } | 490 } |
443 | 491 |
| 492 abstract class InputListenerInterface |
| 493 implements bindings.MojoInterface<InputListener>, |
| 494 InputListener { |
| 495 factory InputListenerInterface([InputListener impl]) => |
| 496 new InputListenerStub.unbound(impl); |
| 497 factory InputListenerInterface.fromEndpoint( |
| 498 core.MojoMessagePipeEndpoint endpoint, |
| 499 [InputListener impl]) => |
| 500 new InputListenerStub.fromEndpoint(endpoint, impl); |
| 501 } |
| 502 |
| 503 abstract class InputListenerInterfaceRequest |
| 504 implements bindings.MojoInterface<InputListener>, |
| 505 InputListener { |
| 506 factory InputListenerInterfaceRequest() => |
| 507 new InputListenerProxy.unbound(); |
| 508 } |
| 509 |
444 class _InputListenerProxyControl | 510 class _InputListenerProxyControl |
445 extends bindings.ProxyMessageHandler | 511 extends bindings.ProxyMessageHandler |
446 implements bindings.ProxyControl { | 512 implements bindings.ProxyControl<InputListener> { |
447 _InputListenerProxyControl.fromEndpoint( | 513 _InputListenerProxyControl.fromEndpoint( |
448 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 514 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
449 | 515 |
450 _InputListenerProxyControl.fromHandle( | 516 _InputListenerProxyControl.fromHandle( |
451 core.MojoHandle handle) : super.fromHandle(handle); | 517 core.MojoHandle handle) : super.fromHandle(handle); |
452 | 518 |
453 _InputListenerProxyControl.unbound() : super.unbound(); | 519 _InputListenerProxyControl.unbound() : super.unbound(); |
454 | 520 |
455 service_describer.ServiceDescription get serviceDescription => | |
456 new _InputListenerServiceDescription(); | |
457 | |
458 String get serviceName => InputListener.serviceName; | 521 String get serviceName => InputListener.serviceName; |
459 | 522 |
460 void handleResponse(bindings.ServiceMessage message) { | 523 void handleResponse(bindings.ServiceMessage message) { |
461 switch (message.header.type) { | 524 switch (message.header.type) { |
462 case _inputListenerMethodOnEventName: | 525 case _inputListenerMethodOnEventName: |
463 var r = InputListenerOnEventResponseParams.deserialize( | 526 var r = InputListenerOnEventResponseParams.deserialize( |
464 message.payload); | 527 message.payload); |
465 if (!message.header.hasRequestId) { | 528 if (!message.header.hasRequestId) { |
466 proxyError("Expected a message with a valid request Id."); | 529 proxyError("Expected a message with a valid request Id."); |
467 return; | 530 return; |
(...skipping 11 matching lines...) Expand all Loading... |
479 } | 542 } |
480 c.complete(r); | 543 c.complete(r); |
481 break; | 544 break; |
482 default: | 545 default: |
483 proxyError("Unexpected message type: ${message.header.type}"); | 546 proxyError("Unexpected message type: ${message.header.type}"); |
484 close(immediate: true); | 547 close(immediate: true); |
485 break; | 548 break; |
486 } | 549 } |
487 } | 550 } |
488 | 551 |
| 552 InputListener get impl => null; |
| 553 set impl(InputListener _) { |
| 554 throw new core.MojoApiError("The impl of a Proxy cannot be set."); |
| 555 } |
| 556 |
489 @override | 557 @override |
490 String toString() { | 558 String toString() { |
491 var superString = super.toString(); | 559 var superString = super.toString(); |
492 return "_InputListenerProxyControl($superString)"; | 560 return "_InputListenerProxyControl($superString)"; |
493 } | 561 } |
494 } | 562 } |
495 | 563 |
496 class InputListenerProxy | 564 class InputListenerProxy |
497 extends bindings.Proxy | 565 extends bindings.Proxy<InputListener> |
498 implements InputListener { | 566 implements InputListener, |
| 567 InputListenerInterface, |
| 568 InputListenerInterfaceRequest { |
499 InputListenerProxy.fromEndpoint( | 569 InputListenerProxy.fromEndpoint( |
500 core.MojoMessagePipeEndpoint endpoint) | 570 core.MojoMessagePipeEndpoint endpoint) |
501 : super(new _InputListenerProxyControl.fromEndpoint(endpoint)); | 571 : super(new _InputListenerProxyControl.fromEndpoint(endpoint)); |
502 | 572 |
503 InputListenerProxy.fromHandle(core.MojoHandle handle) | 573 InputListenerProxy.fromHandle(core.MojoHandle handle) |
504 : super(new _InputListenerProxyControl.fromHandle(handle)); | 574 : super(new _InputListenerProxyControl.fromHandle(handle)); |
505 | 575 |
506 InputListenerProxy.unbound() | 576 InputListenerProxy.unbound() |
507 : super(new _InputListenerProxyControl.unbound()); | 577 : super(new _InputListenerProxyControl.unbound()); |
508 | 578 |
509 static InputListenerProxy newFromEndpoint( | 579 static InputListenerProxy newFromEndpoint( |
510 core.MojoMessagePipeEndpoint endpoint) { | 580 core.MojoMessagePipeEndpoint endpoint) { |
511 assert(endpoint.setDescription("For InputListenerProxy")); | 581 assert(endpoint.setDescription("For InputListenerProxy")); |
512 return new InputListenerProxy.fromEndpoint(endpoint); | 582 return new InputListenerProxy.fromEndpoint(endpoint); |
513 } | 583 } |
514 | 584 |
515 factory InputListenerProxy.connectToService( | |
516 bindings.ServiceConnector s, String url, [String serviceName]) { | |
517 InputListenerProxy p = new InputListenerProxy.unbound(); | |
518 s.connectToService(url, p, serviceName); | |
519 return p; | |
520 } | |
521 | |
522 | 585 |
523 dynamic onEvent(input_events_mojom.Event event,[Function responseFactory = nul
l]) { | 586 dynamic onEvent(input_events_mojom.Event event,[Function responseFactory = nul
l]) { |
524 var params = new _InputListenerOnEventParams(); | 587 var params = new _InputListenerOnEventParams(); |
525 params.event = event; | 588 params.event = event; |
526 return ctrl.sendMessageWithRequestId( | 589 return ctrl.sendMessageWithRequestId( |
527 params, | 590 params, |
528 _inputListenerMethodOnEventName, | 591 _inputListenerMethodOnEventName, |
529 -1, | 592 -1, |
530 bindings.MessageHeader.kMessageExpectsResponse); | 593 bindings.MessageHeader.kMessageExpectsResponse); |
531 } | 594 } |
(...skipping 11 matching lines...) Expand all Loading... |
543 } | 606 } |
544 | 607 |
545 _InputListenerStubControl.fromHandle( | 608 _InputListenerStubControl.fromHandle( |
546 core.MojoHandle handle, [InputListener impl]) | 609 core.MojoHandle handle, [InputListener impl]) |
547 : super.fromHandle(handle, autoBegin: impl != null) { | 610 : super.fromHandle(handle, autoBegin: impl != null) { |
548 _impl = impl; | 611 _impl = impl; |
549 } | 612 } |
550 | 613 |
551 _InputListenerStubControl.unbound([this._impl]) : super.unbound(); | 614 _InputListenerStubControl.unbound([this._impl]) : super.unbound(); |
552 | 615 |
| 616 String get serviceName => InputListener.serviceName; |
| 617 |
553 | 618 |
554 InputListenerOnEventResponseParams _inputListenerOnEventResponseParamsFactory(
bool consumed) { | 619 InputListenerOnEventResponseParams _inputListenerOnEventResponseParamsFactory(
bool consumed) { |
555 var result = new InputListenerOnEventResponseParams(); | 620 var result = new InputListenerOnEventResponseParams(); |
556 result.consumed = consumed; | 621 result.consumed = consumed; |
557 return result; | 622 return result; |
558 } | 623 } |
559 | 624 |
560 dynamic handleMessage(bindings.ServiceMessage message) { | 625 dynamic handleMessage(bindings.ServiceMessage message) { |
561 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 626 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
562 return bindings.ControlMessageHandler.handleMessage(this, | 627 return bindings.ControlMessageHandler.handleMessage(this, |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 } | 680 } |
616 } | 681 } |
617 | 682 |
618 @override | 683 @override |
619 String toString() { | 684 String toString() { |
620 var superString = super.toString(); | 685 var superString = super.toString(); |
621 return "_InputListenerStubControl($superString)"; | 686 return "_InputListenerStubControl($superString)"; |
622 } | 687 } |
623 | 688 |
624 int get version => 0; | 689 int get version => 0; |
625 | |
626 static service_describer.ServiceDescription _cachedServiceDescription; | |
627 static service_describer.ServiceDescription get serviceDescription { | |
628 if (_cachedServiceDescription == null) { | |
629 _cachedServiceDescription = new _InputListenerServiceDescription(); | |
630 } | |
631 return _cachedServiceDescription; | |
632 } | |
633 } | 690 } |
634 | 691 |
635 class InputListenerStub | 692 class InputListenerStub |
636 extends bindings.Stub<InputListener> | 693 extends bindings.Stub<InputListener> |
637 implements InputListener { | 694 implements InputListener, |
| 695 InputListenerInterface, |
| 696 InputListenerInterfaceRequest { |
| 697 InputListenerStub.unbound([InputListener impl]) |
| 698 : super(new _InputListenerStubControl.unbound(impl)); |
| 699 |
638 InputListenerStub.fromEndpoint( | 700 InputListenerStub.fromEndpoint( |
639 core.MojoMessagePipeEndpoint endpoint, [InputListener impl]) | 701 core.MojoMessagePipeEndpoint endpoint, [InputListener impl]) |
640 : super(new _InputListenerStubControl.fromEndpoint(endpoint, impl)); | 702 : super(new _InputListenerStubControl.fromEndpoint(endpoint, impl)); |
641 | 703 |
642 InputListenerStub.fromHandle( | 704 InputListenerStub.fromHandle( |
643 core.MojoHandle handle, [InputListener impl]) | 705 core.MojoHandle handle, [InputListener impl]) |
644 : super(new _InputListenerStubControl.fromHandle(handle, impl)); | 706 : super(new _InputListenerStubControl.fromHandle(handle, impl)); |
645 | 707 |
646 InputListenerStub.unbound([InputListener impl]) | |
647 : super(new _InputListenerStubControl.unbound(impl)); | |
648 | |
649 static InputListenerStub newFromEndpoint( | 708 static InputListenerStub newFromEndpoint( |
650 core.MojoMessagePipeEndpoint endpoint) { | 709 core.MojoMessagePipeEndpoint endpoint) { |
651 assert(endpoint.setDescription("For InputListenerStub")); | 710 assert(endpoint.setDescription("For InputListenerStub")); |
652 return new InputListenerStub.fromEndpoint(endpoint); | 711 return new InputListenerStub.fromEndpoint(endpoint); |
653 } | 712 } |
654 | 713 |
655 static service_describer.ServiceDescription get serviceDescription => | |
656 _InputListenerStubControl.serviceDescription; | |
657 | |
658 | 714 |
659 dynamic onEvent(input_events_mojom.Event event,[Function responseFactory = nul
l]) { | 715 dynamic onEvent(input_events_mojom.Event event,[Function responseFactory = nul
l]) { |
660 return impl.onEvent(event,responseFactory); | 716 return impl.onEvent(event,responseFactory); |
661 } | 717 } |
662 } | 718 } |
663 | 719 |
664 | 720 |
665 | 721 |
OLD | NEW |