| 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 notifications_mojom; | 5 library notifications_mojom; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:mojo/bindings.dart' as bindings; | 9 import 'package:mojo/bindings.dart' as bindings; |
| 10 import 'package:mojo/core.dart' as core; | 10 import 'package:mojo/core.dart' as core; |
| 11 import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types; |
| 12 import 'package:mojo/mojo/service_describer.mojom.dart' as service_describer; |
| 11 | 13 |
| 12 | 14 |
| 13 | 15 |
| 14 class NotificationData extends bindings.Struct { | 16 class NotificationData extends bindings.Struct { |
| 15 static const List<bindings.StructDataHeader> kVersions = const [ | 17 static const List<bindings.StructDataHeader> kVersions = const [ |
| 16 const bindings.StructDataHeader(24, 0) | 18 const bindings.StructDataHeader(24, 0) |
| 17 ]; | 19 ]; |
| 18 String title = null; | 20 String title = null; |
| 19 String text = null; | 21 String text = null; |
| 20 | 22 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 } | 81 } |
| 80 | 82 |
| 81 Map toJson() { | 83 Map toJson() { |
| 82 Map map = new Map(); | 84 Map map = new Map(); |
| 83 map["title"] = title; | 85 map["title"] = title; |
| 84 map["text"] = text; | 86 map["text"] = text; |
| 85 return map; | 87 return map; |
| 86 } | 88 } |
| 87 } | 89 } |
| 88 | 90 |
| 91 mojom_types.MojomStruct _notifications_NotificationData__() { |
| 92 return new mojom_types.MojomStruct() |
| 93 ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationDa
ta') |
| 94 ..fields = <mojom_types.StructField>[ |
| 95 new mojom_types.StructField() |
| 96 ..declData = (new mojom_types.DeclarationData()..shortName = 'Title') |
| 97 ..type = (new mojom_types.Type() |
| 98 ..stringType = (new mojom_types.StringType()..nullable = true)), |
| 99 |
| 100 new mojom_types.StructField() |
| 101 ..declData = (new mojom_types.DeclarationData()..shortName = 'Text') |
| 102 ..type = (new mojom_types.Type() |
| 103 ..stringType = (new mojom_types.StringType()..nullable = true)), |
| 104 ]; |
| 105 } |
| 106 |
| 89 | 107 |
| 90 class NotificationClientOnSelectedParams extends bindings.Struct { | 108 class NotificationClientOnSelectedParams extends bindings.Struct { |
| 91 static const List<bindings.StructDataHeader> kVersions = const [ | 109 static const List<bindings.StructDataHeader> kVersions = const [ |
| 92 const bindings.StructDataHeader(8, 0) | 110 const bindings.StructDataHeader(8, 0) |
| 93 ]; | 111 ]; |
| 94 | 112 |
| 95 NotificationClientOnSelectedParams() : super(kVersions.last.size); | 113 NotificationClientOnSelectedParams() : super(kVersions.last.size); |
| 96 | 114 |
| 97 static NotificationClientOnSelectedParams deserialize(bindings.Message message
) { | 115 static NotificationClientOnSelectedParams deserialize(bindings.Message message
) { |
| 98 var decoder = new bindings.Decoder(message); | 116 var decoder = new bindings.Decoder(message); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 String toString() { | 155 String toString() { |
| 138 return "NotificationClientOnSelectedParams("")"; | 156 return "NotificationClientOnSelectedParams("")"; |
| 139 } | 157 } |
| 140 | 158 |
| 141 Map toJson() { | 159 Map toJson() { |
| 142 Map map = new Map(); | 160 Map map = new Map(); |
| 143 return map; | 161 return map; |
| 144 } | 162 } |
| 145 } | 163 } |
| 146 | 164 |
| 165 mojom_types.MojomStruct _notifications_NotificationClient_OnSelected_Params__()
{ |
| 166 return new mojom_types.MojomStruct() |
| 167 ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationCl
ientOnSelectedParams') |
| 168 ..fields = <mojom_types.StructField>[]; |
| 169 } |
| 170 |
| 147 | 171 |
| 148 class NotificationClientOnDismissedParams extends bindings.Struct { | 172 class NotificationClientOnDismissedParams extends bindings.Struct { |
| 149 static const List<bindings.StructDataHeader> kVersions = const [ | 173 static const List<bindings.StructDataHeader> kVersions = const [ |
| 150 const bindings.StructDataHeader(8, 0) | 174 const bindings.StructDataHeader(8, 0) |
| 151 ]; | 175 ]; |
| 152 | 176 |
| 153 NotificationClientOnDismissedParams() : super(kVersions.last.size); | 177 NotificationClientOnDismissedParams() : super(kVersions.last.size); |
| 154 | 178 |
| 155 static NotificationClientOnDismissedParams deserialize(bindings.Message messag
e) { | 179 static NotificationClientOnDismissedParams deserialize(bindings.Message messag
e) { |
| 156 var decoder = new bindings.Decoder(message); | 180 var decoder = new bindings.Decoder(message); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 String toString() { | 219 String toString() { |
| 196 return "NotificationClientOnDismissedParams("")"; | 220 return "NotificationClientOnDismissedParams("")"; |
| 197 } | 221 } |
| 198 | 222 |
| 199 Map toJson() { | 223 Map toJson() { |
| 200 Map map = new Map(); | 224 Map map = new Map(); |
| 201 return map; | 225 return map; |
| 202 } | 226 } |
| 203 } | 227 } |
| 204 | 228 |
| 229 mojom_types.MojomStruct _notifications_NotificationClient_OnDismissed_Params__()
{ |
| 230 return new mojom_types.MojomStruct() |
| 231 ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationCl
ientOnDismissedParams') |
| 232 ..fields = <mojom_types.StructField>[]; |
| 233 } |
| 234 |
| 205 | 235 |
| 206 class NotificationUpdateParams extends bindings.Struct { | 236 class NotificationUpdateParams extends bindings.Struct { |
| 207 static const List<bindings.StructDataHeader> kVersions = const [ | 237 static const List<bindings.StructDataHeader> kVersions = const [ |
| 208 const bindings.StructDataHeader(16, 0) | 238 const bindings.StructDataHeader(16, 0) |
| 209 ]; | 239 ]; |
| 210 NotificationData notificationData = null; | 240 NotificationData notificationData = null; |
| 211 | 241 |
| 212 NotificationUpdateParams() : super(kVersions.last.size); | 242 NotificationUpdateParams() : super(kVersions.last.size); |
| 213 | 243 |
| 214 static NotificationUpdateParams deserialize(bindings.Message message) { | 244 static NotificationUpdateParams deserialize(bindings.Message message) { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 "notificationData: $notificationData" ")"; | 293 "notificationData: $notificationData" ")"; |
| 264 } | 294 } |
| 265 | 295 |
| 266 Map toJson() { | 296 Map toJson() { |
| 267 Map map = new Map(); | 297 Map map = new Map(); |
| 268 map["notificationData"] = notificationData; | 298 map["notificationData"] = notificationData; |
| 269 return map; | 299 return map; |
| 270 } | 300 } |
| 271 } | 301 } |
| 272 | 302 |
| 303 mojom_types.MojomStruct _notifications_Notification_Update_Params__() { |
| 304 return new mojom_types.MojomStruct() |
| 305 ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationUp
dateParams') |
| 306 ..fields = <mojom_types.StructField>[ |
| 307 new mojom_types.StructField() |
| 308 ..declData = (new mojom_types.DeclarationData()..shortName = 'Notificati
onData') |
| 309 ..type = (new mojom_types.Type() |
| 310 ..typeReference = (new mojom_types.TypeReference() |
| 311 |
| 312 ..identifier = '_notifications_NotificationData__' |
| 313 ..typeKey = '_notifications_NotificationData__' |
| 314 )), |
| 315 ]; |
| 316 } |
| 317 |
| 273 | 318 |
| 274 class NotificationCancelParams extends bindings.Struct { | 319 class NotificationCancelParams extends bindings.Struct { |
| 275 static const List<bindings.StructDataHeader> kVersions = const [ | 320 static const List<bindings.StructDataHeader> kVersions = const [ |
| 276 const bindings.StructDataHeader(8, 0) | 321 const bindings.StructDataHeader(8, 0) |
| 277 ]; | 322 ]; |
| 278 | 323 |
| 279 NotificationCancelParams() : super(kVersions.last.size); | 324 NotificationCancelParams() : super(kVersions.last.size); |
| 280 | 325 |
| 281 static NotificationCancelParams deserialize(bindings.Message message) { | 326 static NotificationCancelParams deserialize(bindings.Message message) { |
| 282 var decoder = new bindings.Decoder(message); | 327 var decoder = new bindings.Decoder(message); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 String toString() { | 366 String toString() { |
| 322 return "NotificationCancelParams("")"; | 367 return "NotificationCancelParams("")"; |
| 323 } | 368 } |
| 324 | 369 |
| 325 Map toJson() { | 370 Map toJson() { |
| 326 Map map = new Map(); | 371 Map map = new Map(); |
| 327 return map; | 372 return map; |
| 328 } | 373 } |
| 329 } | 374 } |
| 330 | 375 |
| 376 mojom_types.MojomStruct _notifications_Notification_Cancel_Params__() { |
| 377 return new mojom_types.MojomStruct() |
| 378 ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationCa
ncelParams') |
| 379 ..fields = <mojom_types.StructField>[]; |
| 380 } |
| 381 |
| 331 | 382 |
| 332 class NotificationServicePostParams extends bindings.Struct { | 383 class NotificationServicePostParams extends bindings.Struct { |
| 333 static const List<bindings.StructDataHeader> kVersions = const [ | 384 static const List<bindings.StructDataHeader> kVersions = const [ |
| 334 const bindings.StructDataHeader(32, 0) | 385 const bindings.StructDataHeader(32, 0) |
| 335 ]; | 386 ]; |
| 336 NotificationData notificationData = null; | 387 NotificationData notificationData = null; |
| 337 Object client = null; | 388 Object client = null; |
| 338 Object notification = null; | 389 Object notification = null; |
| 339 | 390 |
| 340 NotificationServicePostParams() : super(kVersions.last.size); | 391 NotificationServicePostParams() : super(kVersions.last.size); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 "client: $client" ", " | 455 "client: $client" ", " |
| 405 "notification: $notification" ")"; | 456 "notification: $notification" ")"; |
| 406 } | 457 } |
| 407 | 458 |
| 408 Map toJson() { | 459 Map toJson() { |
| 409 throw new bindings.MojoCodecError( | 460 throw new bindings.MojoCodecError( |
| 410 'Object containing handles cannot be encoded to JSON.'); | 461 'Object containing handles cannot be encoded to JSON.'); |
| 411 } | 462 } |
| 412 } | 463 } |
| 413 | 464 |
| 465 mojom_types.MojomStruct _notifications_NotificationService_Post_Params__() { |
| 466 return new mojom_types.MojomStruct() |
| 467 ..declData = (new mojom_types.DeclarationData()..shortName = 'NotificationSe
rvicePostParams') |
| 468 ..fields = <mojom_types.StructField>[ |
| 469 new mojom_types.StructField() |
| 470 ..declData = (new mojom_types.DeclarationData()..shortName = 'Notificati
onData') |
| 471 ..type = (new mojom_types.Type() |
| 472 ..typeReference = (new mojom_types.TypeReference() |
| 473 |
| 474 ..identifier = '_notifications_NotificationData__' |
| 475 ..typeKey = '_notifications_NotificationData__' |
| 476 )), |
| 477 |
| 478 new mojom_types.StructField() |
| 479 ..declData = (new mojom_types.DeclarationData()..shortName = 'Client') |
| 480 ..type = (new mojom_types.Type() |
| 481 ..typeReference = (new mojom_types.TypeReference() |
| 482 ..nullable = true |
| 483 |
| 484 |
| 485 ..identifier = '_notifications_NotificationClient__' |
| 486 ..typeKey = '_notifications_NotificationClient__' |
| 487 )), |
| 488 |
| 489 new mojom_types.StructField() |
| 490 ..declData = (new mojom_types.DeclarationData()..shortName = 'Notificati
on') |
| 491 ..type = (new mojom_types.Type() |
| 492 ..typeReference = (new mojom_types.TypeReference() |
| 493 ..nullable = true |
| 494 |
| 495 |
| 496 ..isInterfaceRequest = true |
| 497 ..identifier = '_notifications_Notification__' |
| 498 ..typeKey = '_notifications_Notification__' |
| 499 )), |
| 500 ]; |
| 501 } |
| 502 |
| 503 |
| 414 const int kNotificationClient_onSelected_name = 0; | 504 const int kNotificationClient_onSelected_name = 0; |
| 415 const int kNotificationClient_onDismissed_name = 1; | 505 const int kNotificationClient_onDismissed_name = 1; |
| 416 | 506 |
| 417 const String NotificationClientName = | 507 const String NotificationClientName = |
| 418 'notifications::NotificationClient'; | 508 'notifications::NotificationClient'; |
| 419 | 509 |
| 510 mojom_types.MojomInterface _notifications_NotificationClient__() { |
| 511 return new mojom_types.MojomInterface() |
| 512 ..declData = (new mojom_types.DeclarationData()..shortName = "NotificationCl
ient") |
| 513 ..interfaceName = "NotificationClient" |
| 514 ..methods = <int, mojom_types.MojomMethod>{ |
| 515 kNotificationClient_onSelected_name: new mojom_types.MojomMethod() |
| 516 ..declData = (new mojom_types.DeclarationData()..shortName = "OnSelected
") |
| 517 ..ordinal = kNotificationClient_onSelected_name..parameters = _notificat
ions_NotificationClient_OnSelected_Params__(),kNotificationClient_onDismissed_na
me: new mojom_types.MojomMethod() |
| 518 ..declData = (new mojom_types.DeclarationData()..shortName = "OnDismisse
d") |
| 519 ..ordinal = kNotificationClient_onDismissed_name..parameters = _notifica
tions_NotificationClient_OnDismissed_Params__(), |
| 520 }; |
| 521 } |
| 522 |
| 523 class _NotificationClientServiceDescription extends service_describer.ServiceDes
cription { |
| 524 // Avoid infinite loop by overriding serviceDescription field. |
| 525 final service_describer.ServiceDescription serviceDescription = null; |
| 526 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 527 return _notifications_NotificationClient__(); |
| 528 } |
| 529 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 530 return getAllMojomTypeDefinitions()[typeKey]; |
| 531 } |
| 532 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 533 return getAllMojomTypeDefinitions(); |
| 534 } |
| 535 } |
| 536 |
| 420 abstract class NotificationClient { | 537 abstract class NotificationClient { |
| 421 void onSelected(); | 538 void onSelected(); |
| 422 void onDismissed(); | 539 void onDismissed(); |
| 423 | 540 |
| 424 } | 541 } |
| 425 | 542 |
| 426 | 543 |
| 427 class NotificationClientProxyImpl extends bindings.Proxy { | 544 class NotificationClientProxyImpl extends bindings.Proxy { |
| 428 NotificationClientProxyImpl.fromEndpoint( | 545 NotificationClientProxyImpl.fromEndpoint( |
| 429 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 546 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
| 430 | 547 |
| 431 NotificationClientProxyImpl.fromHandle(core.MojoHandle handle) : | 548 NotificationClientProxyImpl.fromHandle(core.MojoHandle handle) : |
| 432 super.fromHandle(handle); | 549 super.fromHandle(handle); |
| 433 | 550 |
| 434 NotificationClientProxyImpl.unbound() : super.unbound(); | 551 NotificationClientProxyImpl.unbound() : super.unbound(); |
| 435 | 552 |
| 436 static NotificationClientProxyImpl newFromEndpoint( | 553 static NotificationClientProxyImpl newFromEndpoint( |
| 437 core.MojoMessagePipeEndpoint endpoint) { | 554 core.MojoMessagePipeEndpoint endpoint) { |
| 438 assert(endpoint.setDescription("For NotificationClientProxyImpl")); | 555 assert(endpoint.setDescription("For NotificationClientProxyImpl")); |
| 439 return new NotificationClientProxyImpl.fromEndpoint(endpoint); | 556 return new NotificationClientProxyImpl.fromEndpoint(endpoint); |
| 440 } | 557 } |
| 441 | 558 |
| 442 String get name => NotificationClientName; | 559 String get name => NotificationClientName; |
| 443 | 560 |
| 561 service_describer.ServiceDescription get serviceDescription => |
| 562 new _NotificationClientServiceDescription(); |
| 563 |
| 444 void handleResponse(bindings.ServiceMessage message) { | 564 void handleResponse(bindings.ServiceMessage message) { |
| 445 switch (message.header.type) { | 565 switch (message.header.type) { |
| 446 default: | 566 default: |
| 447 proxyError("Unexpected message type: ${message.header.type}"); | 567 proxyError("Unexpected message type: ${message.header.type}"); |
| 448 close(immediate: true); | 568 close(immediate: true); |
| 449 break; | 569 break; |
| 450 } | 570 } |
| 451 } | 571 } |
| 452 | 572 |
| 453 String toString() { | 573 String toString() { |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 592 assert(_impl == null); | 712 assert(_impl == null); |
| 593 _impl = d; | 713 _impl = d; |
| 594 } | 714 } |
| 595 | 715 |
| 596 String toString() { | 716 String toString() { |
| 597 var superString = super.toString(); | 717 var superString = super.toString(); |
| 598 return "NotificationClientStub($superString)"; | 718 return "NotificationClientStub($superString)"; |
| 599 } | 719 } |
| 600 | 720 |
| 601 int get version => 0; | 721 int get version => 0; |
| 722 |
| 723 service_describer.ServiceDescription get serviceDescription => |
| 724 new _NotificationClientServiceDescription(); |
| 602 } | 725 } |
| 603 | 726 |
| 604 const int kNotification_update_name = 0; | 727 const int kNotification_update_name = 0; |
| 605 const int kNotification_cancel_name = 1; | 728 const int kNotification_cancel_name = 1; |
| 606 | 729 |
| 607 const String NotificationName = | 730 const String NotificationName = |
| 608 'notifications::Notification'; | 731 'notifications::Notification'; |
| 609 | 732 |
| 733 mojom_types.MojomInterface _notifications_Notification__() { |
| 734 return new mojom_types.MojomInterface() |
| 735 ..declData = (new mojom_types.DeclarationData()..shortName = "Notification") |
| 736 ..interfaceName = "Notification" |
| 737 ..methods = <int, mojom_types.MojomMethod>{ |
| 738 kNotification_update_name: new mojom_types.MojomMethod() |
| 739 ..declData = (new mojom_types.DeclarationData()..shortName = "Update") |
| 740 ..ordinal = kNotification_update_name..parameters = _notifications_Notif
ication_Update_Params__(),kNotification_cancel_name: new mojom_types.MojomMethod
() |
| 741 ..declData = (new mojom_types.DeclarationData()..shortName = "Cancel") |
| 742 ..ordinal = kNotification_cancel_name..parameters = _notifications_Notif
ication_Cancel_Params__(), |
| 743 }; |
| 744 } |
| 745 |
| 746 class _NotificationServiceDescription extends service_describer.ServiceDescripti
on { |
| 747 // Avoid infinite loop by overriding serviceDescription field. |
| 748 final service_describer.ServiceDescription serviceDescription = null; |
| 749 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 750 return _notifications_Notification__(); |
| 751 } |
| 752 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 753 return getAllMojomTypeDefinitions()[typeKey]; |
| 754 } |
| 755 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 756 return getAllMojomTypeDefinitions(); |
| 757 } |
| 758 } |
| 759 |
| 610 abstract class Notification { | 760 abstract class Notification { |
| 611 void update(NotificationData notificationData); | 761 void update(NotificationData notificationData); |
| 612 void cancel(); | 762 void cancel(); |
| 613 | 763 |
| 614 } | 764 } |
| 615 | 765 |
| 616 | 766 |
| 617 class NotificationProxyImpl extends bindings.Proxy { | 767 class NotificationProxyImpl extends bindings.Proxy { |
| 618 NotificationProxyImpl.fromEndpoint( | 768 NotificationProxyImpl.fromEndpoint( |
| 619 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 769 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
| 620 | 770 |
| 621 NotificationProxyImpl.fromHandle(core.MojoHandle handle) : | 771 NotificationProxyImpl.fromHandle(core.MojoHandle handle) : |
| 622 super.fromHandle(handle); | 772 super.fromHandle(handle); |
| 623 | 773 |
| 624 NotificationProxyImpl.unbound() : super.unbound(); | 774 NotificationProxyImpl.unbound() : super.unbound(); |
| 625 | 775 |
| 626 static NotificationProxyImpl newFromEndpoint( | 776 static NotificationProxyImpl newFromEndpoint( |
| 627 core.MojoMessagePipeEndpoint endpoint) { | 777 core.MojoMessagePipeEndpoint endpoint) { |
| 628 assert(endpoint.setDescription("For NotificationProxyImpl")); | 778 assert(endpoint.setDescription("For NotificationProxyImpl")); |
| 629 return new NotificationProxyImpl.fromEndpoint(endpoint); | 779 return new NotificationProxyImpl.fromEndpoint(endpoint); |
| 630 } | 780 } |
| 631 | 781 |
| 632 String get name => NotificationName; | 782 String get name => NotificationName; |
| 633 | 783 |
| 784 service_describer.ServiceDescription get serviceDescription => |
| 785 new _NotificationServiceDescription(); |
| 786 |
| 634 void handleResponse(bindings.ServiceMessage message) { | 787 void handleResponse(bindings.ServiceMessage message) { |
| 635 switch (message.header.type) { | 788 switch (message.header.type) { |
| 636 default: | 789 default: |
| 637 proxyError("Unexpected message type: ${message.header.type}"); | 790 proxyError("Unexpected message type: ${message.header.type}"); |
| 638 close(immediate: true); | 791 close(immediate: true); |
| 639 break; | 792 break; |
| 640 } | 793 } |
| 641 } | 794 } |
| 642 | 795 |
| 643 String toString() { | 796 String toString() { |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 assert(_impl == null); | 936 assert(_impl == null); |
| 784 _impl = d; | 937 _impl = d; |
| 785 } | 938 } |
| 786 | 939 |
| 787 String toString() { | 940 String toString() { |
| 788 var superString = super.toString(); | 941 var superString = super.toString(); |
| 789 return "NotificationStub($superString)"; | 942 return "NotificationStub($superString)"; |
| 790 } | 943 } |
| 791 | 944 |
| 792 int get version => 0; | 945 int get version => 0; |
| 946 |
| 947 service_describer.ServiceDescription get serviceDescription => |
| 948 new _NotificationServiceDescription(); |
| 793 } | 949 } |
| 794 | 950 |
| 795 const int kNotificationService_post_name = 0; | 951 const int kNotificationService_post_name = 0; |
| 796 | 952 |
| 797 const String NotificationServiceName = | 953 const String NotificationServiceName = |
| 798 'notifications::NotificationService'; | 954 'notifications::NotificationService'; |
| 799 | 955 |
| 956 mojom_types.MojomInterface _notifications_NotificationService__() { |
| 957 return new mojom_types.MojomInterface() |
| 958 ..declData = (new mojom_types.DeclarationData()..shortName = "NotificationSe
rvice") |
| 959 ..interfaceName = "NotificationService" |
| 960 ..methods = <int, mojom_types.MojomMethod>{ |
| 961 kNotificationService_post_name: new mojom_types.MojomMethod() |
| 962 ..declData = (new mojom_types.DeclarationData()..shortName = "Post") |
| 963 ..ordinal = kNotificationService_post_name..parameters = _notifications_
NotificationService_Post_Params__(), |
| 964 }; |
| 965 } |
| 966 |
| 967 class _NotificationServiceServiceDescription extends service_describer.ServiceDe
scription { |
| 968 // Avoid infinite loop by overriding serviceDescription field. |
| 969 final service_describer.ServiceDescription serviceDescription = null; |
| 970 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 971 return _notifications_NotificationService__(); |
| 972 } |
| 973 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 974 return getAllMojomTypeDefinitions()[typeKey]; |
| 975 } |
| 976 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 977 return getAllMojomTypeDefinitions(); |
| 978 } |
| 979 } |
| 980 |
| 800 abstract class NotificationService { | 981 abstract class NotificationService { |
| 801 void post(NotificationData notificationData, Object client, Object notificatio
n); | 982 void post(NotificationData notificationData, Object client, Object notificatio
n); |
| 802 | 983 |
| 803 } | 984 } |
| 804 | 985 |
| 805 | 986 |
| 806 class NotificationServiceProxyImpl extends bindings.Proxy { | 987 class NotificationServiceProxyImpl extends bindings.Proxy { |
| 807 NotificationServiceProxyImpl.fromEndpoint( | 988 NotificationServiceProxyImpl.fromEndpoint( |
| 808 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 989 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
| 809 | 990 |
| 810 NotificationServiceProxyImpl.fromHandle(core.MojoHandle handle) : | 991 NotificationServiceProxyImpl.fromHandle(core.MojoHandle handle) : |
| 811 super.fromHandle(handle); | 992 super.fromHandle(handle); |
| 812 | 993 |
| 813 NotificationServiceProxyImpl.unbound() : super.unbound(); | 994 NotificationServiceProxyImpl.unbound() : super.unbound(); |
| 814 | 995 |
| 815 static NotificationServiceProxyImpl newFromEndpoint( | 996 static NotificationServiceProxyImpl newFromEndpoint( |
| 816 core.MojoMessagePipeEndpoint endpoint) { | 997 core.MojoMessagePipeEndpoint endpoint) { |
| 817 assert(endpoint.setDescription("For NotificationServiceProxyImpl")); | 998 assert(endpoint.setDescription("For NotificationServiceProxyImpl")); |
| 818 return new NotificationServiceProxyImpl.fromEndpoint(endpoint); | 999 return new NotificationServiceProxyImpl.fromEndpoint(endpoint); |
| 819 } | 1000 } |
| 820 | 1001 |
| 821 String get name => NotificationServiceName; | 1002 String get name => NotificationServiceName; |
| 822 | 1003 |
| 1004 service_describer.ServiceDescription get serviceDescription => |
| 1005 new _NotificationServiceServiceDescription(); |
| 1006 |
| 823 void handleResponse(bindings.ServiceMessage message) { | 1007 void handleResponse(bindings.ServiceMessage message) { |
| 824 switch (message.header.type) { | 1008 switch (message.header.type) { |
| 825 default: | 1009 default: |
| 826 proxyError("Unexpected message type: ${message.header.type}"); | 1010 proxyError("Unexpected message type: ${message.header.type}"); |
| 827 close(immediate: true); | 1011 close(immediate: true); |
| 828 break; | 1012 break; |
| 829 } | 1013 } |
| 830 } | 1014 } |
| 831 | 1015 |
| 832 String toString() { | 1016 String toString() { |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 960 assert(_impl == null); | 1144 assert(_impl == null); |
| 961 _impl = d; | 1145 _impl = d; |
| 962 } | 1146 } |
| 963 | 1147 |
| 964 String toString() { | 1148 String toString() { |
| 965 var superString = super.toString(); | 1149 var superString = super.toString(); |
| 966 return "NotificationServiceStub($superString)"; | 1150 return "NotificationServiceStub($superString)"; |
| 967 } | 1151 } |
| 968 | 1152 |
| 969 int get version => 0; | 1153 int get version => 0; |
| 1154 |
| 1155 service_describer.ServiceDescription get serviceDescription => |
| 1156 new _NotificationServiceServiceDescription(); |
| 970 } | 1157 } |
| 971 | 1158 |
| 972 | 1159 |
| 1160 |
| 1161 |
| 1162 |
| 1163 |
| 1164 |
| 1165 |
| 1166 var _MojomDesc__ = _initDescriptions(); |
| 1167 |
| 1168 Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
| 1169 var map = new Map<String, mojom_types.UserDefinedType>(); |
| 1170 |
| 1171 map["_notifications_NotificationData__"] = |
| 1172 new mojom_types.UserDefinedType() |
| 1173 ..structType = _notifications_NotificationData__(); |
| 1174 |
| 1175 |
| 1176 |
| 1177 |
| 1178 |
| 1179 |
| 1180 |
| 1181 map["_notifications_NotificationClient_OnSelected_Params__"] = |
| 1182 new mojom_types.UserDefinedType() |
| 1183 ..structType = _notifications_NotificationClient_OnSelected_Params__(); |
| 1184 |
| 1185 |
| 1186 |
| 1187 map["_notifications_NotificationClient_OnDismissed_Params__"] = |
| 1188 new mojom_types.UserDefinedType() |
| 1189 ..structType = _notifications_NotificationClient_OnDismissed_Params__(); |
| 1190 |
| 1191 |
| 1192 |
| 1193 map["_notifications_Notification_Update_Params__"] = |
| 1194 new mojom_types.UserDefinedType() |
| 1195 ..structType = _notifications_Notification_Update_Params__(); |
| 1196 |
| 1197 |
| 1198 |
| 1199 |
| 1200 |
| 1201 map["_notifications_Notification_Cancel_Params__"] = |
| 1202 new mojom_types.UserDefinedType() |
| 1203 ..structType = _notifications_Notification_Cancel_Params__(); |
| 1204 |
| 1205 |
| 1206 |
| 1207 map["_notifications_NotificationService_Post_Params__"] = |
| 1208 new mojom_types.UserDefinedType() |
| 1209 ..structType = _notifications_NotificationService_Post_Params__(); |
| 1210 |
| 1211 |
| 1212 |
| 1213 |
| 1214 map["_notifications_NotificationClient__"] = |
| 1215 new mojom_types.UserDefinedType() |
| 1216 ..interfaceType = _notifications_NotificationClient__(); |
| 1217 |
| 1218 |
| 1219 |
| 1220 |
| 1221 |
| 1222 |
| 1223 |
| 1224 |
| 1225 map["_notifications_NotificationService__"] = |
| 1226 new mojom_types.UserDefinedType() |
| 1227 ..interfaceType = _notifications_NotificationService__(); |
| 1228 |
| 1229 return map; |
| 1230 } |
| 1231 |
| 1232 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
| 1233 return _MojomDesc__; |
| 1234 } |
| 1235 |
| 1236 |
| OLD | NEW |