OLD | NEW |
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 surfaces_mojom; | 4 library surfaces_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 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; | 9 import 'package:mojo_services/mojo/geometry.mojom.dart' as geometry_mojom; |
10 import 'package:mojo_services/mojo/quads.mojom.dart' as quads_mojom; | 10 import 'package:mojo_services/mojo/quads.mojom.dart' as quads_mojom; |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 | 99 |
100 | 100 |
101 class Mailbox extends bindings.Struct { | 101 class Mailbox extends bindings.Struct { |
102 static const List<bindings.StructDataHeader> kVersions = const [ | 102 static const List<bindings.StructDataHeader> kVersions = const [ |
103 const bindings.StructDataHeader(16, 0) | 103 const bindings.StructDataHeader(16, 0) |
104 ]; | 104 ]; |
105 List<int> name = null; | 105 List<int> name = null; |
106 | 106 |
107 Mailbox() : super(kVersions.last.size); | 107 Mailbox() : super(kVersions.last.size); |
108 | 108 |
| 109 Mailbox.init( |
| 110 List<int> this.name |
| 111 ) : super(kVersions.last.size); |
| 112 |
109 static Mailbox deserialize(bindings.Message message) { | 113 static Mailbox deserialize(bindings.Message message) { |
110 var decoder = new bindings.Decoder(message); | 114 var decoder = new bindings.Decoder(message); |
111 var result = decode(decoder); | 115 var result = decode(decoder); |
112 if (decoder.excessHandles != null) { | 116 if (decoder.excessHandles != null) { |
113 decoder.excessHandles.forEach((h) => h.close()); | 117 decoder.excessHandles.forEach((h) => h.close()); |
114 } | 118 } |
115 return result; | 119 return result; |
116 } | 120 } |
117 | 121 |
118 static Mailbox decode(bindings.Decoder decoder0) { | 122 static Mailbox decode(bindings.Decoder decoder0) { |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
173 class MailboxHolder extends bindings.Struct { | 177 class MailboxHolder extends bindings.Struct { |
174 static const List<bindings.StructDataHeader> kVersions = const [ | 178 static const List<bindings.StructDataHeader> kVersions = const [ |
175 const bindings.StructDataHeader(24, 0) | 179 const bindings.StructDataHeader(24, 0) |
176 ]; | 180 ]; |
177 Mailbox mailbox = null; | 181 Mailbox mailbox = null; |
178 int textureTarget = 0; | 182 int textureTarget = 0; |
179 int syncPoint = 0; | 183 int syncPoint = 0; |
180 | 184 |
181 MailboxHolder() : super(kVersions.last.size); | 185 MailboxHolder() : super(kVersions.last.size); |
182 | 186 |
| 187 MailboxHolder.init( |
| 188 Mailbox this.mailbox, |
| 189 int this.textureTarget, |
| 190 int this.syncPoint |
| 191 ) : super(kVersions.last.size); |
| 192 |
183 static MailboxHolder deserialize(bindings.Message message) { | 193 static MailboxHolder deserialize(bindings.Message message) { |
184 var decoder = new bindings.Decoder(message); | 194 var decoder = new bindings.Decoder(message); |
185 var result = decode(decoder); | 195 var result = decode(decoder); |
186 if (decoder.excessHandles != null) { | 196 if (decoder.excessHandles != null) { |
187 decoder.excessHandles.forEach((h) => h.close()); | 197 decoder.excessHandles.forEach((h) => h.close()); |
188 } | 198 } |
189 return result; | 199 return result; |
190 } | 200 } |
191 | 201 |
192 static MailboxHolder decode(bindings.Decoder decoder0) { | 202 static MailboxHolder decode(bindings.Decoder decoder0) { |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
278 int id = 0; | 288 int id = 0; |
279 ResourceFormat format = null; | 289 ResourceFormat format = null; |
280 int filter = 0; | 290 int filter = 0; |
281 bool isRepeated = false; | 291 bool isRepeated = false; |
282 bool isSoftware = false; | 292 bool isSoftware = false; |
283 geometry_mojom.Size size = null; | 293 geometry_mojom.Size size = null; |
284 MailboxHolder mailboxHolder = null; | 294 MailboxHolder mailboxHolder = null; |
285 | 295 |
286 TransferableResource() : super(kVersions.last.size); | 296 TransferableResource() : super(kVersions.last.size); |
287 | 297 |
| 298 TransferableResource.init( |
| 299 int this.id, |
| 300 ResourceFormat this.format, |
| 301 int this.filter, |
| 302 bool this.isRepeated, |
| 303 bool this.isSoftware, |
| 304 geometry_mojom.Size this.size, |
| 305 MailboxHolder this.mailboxHolder |
| 306 ) : super(kVersions.last.size); |
| 307 |
288 static TransferableResource deserialize(bindings.Message message) { | 308 static TransferableResource deserialize(bindings.Message message) { |
289 var decoder = new bindings.Decoder(message); | 309 var decoder = new bindings.Decoder(message); |
290 var result = decode(decoder); | 310 var result = decode(decoder); |
291 if (decoder.excessHandles != null) { | 311 if (decoder.excessHandles != null) { |
292 decoder.excessHandles.forEach((h) => h.close()); | 312 decoder.excessHandles.forEach((h) => h.close()); |
293 } | 313 } |
294 return result; | 314 return result; |
295 } | 315 } |
296 | 316 |
297 static TransferableResource decode(bindings.Decoder decoder0) { | 317 static TransferableResource decode(bindings.Decoder decoder0) { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
437 static const List<bindings.StructDataHeader> kVersions = const [ | 457 static const List<bindings.StructDataHeader> kVersions = const [ |
438 const bindings.StructDataHeader(24, 0) | 458 const bindings.StructDataHeader(24, 0) |
439 ]; | 459 ]; |
440 int id = 0; | 460 int id = 0; |
441 int syncPoint = 0; | 461 int syncPoint = 0; |
442 int count = 0; | 462 int count = 0; |
443 bool lost = false; | 463 bool lost = false; |
444 | 464 |
445 ReturnedResource() : super(kVersions.last.size); | 465 ReturnedResource() : super(kVersions.last.size); |
446 | 466 |
| 467 ReturnedResource.init( |
| 468 int this.id, |
| 469 int this.syncPoint, |
| 470 int this.count, |
| 471 bool this.lost |
| 472 ) : super(kVersions.last.size); |
| 473 |
447 static ReturnedResource deserialize(bindings.Message message) { | 474 static ReturnedResource deserialize(bindings.Message message) { |
448 var decoder = new bindings.Decoder(message); | 475 var decoder = new bindings.Decoder(message); |
449 var result = decode(decoder); | 476 var result = decode(decoder); |
450 if (decoder.excessHandles != null) { | 477 if (decoder.excessHandles != null) { |
451 decoder.excessHandles.forEach((h) => h.close()); | 478 decoder.excessHandles.forEach((h) => h.close()); |
452 } | 479 } |
453 return result; | 480 return result; |
454 } | 481 } |
455 | 482 |
456 static ReturnedResource decode(bindings.Decoder decoder0) { | 483 static ReturnedResource decode(bindings.Decoder decoder0) { |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 | 576 |
550 class Frame extends bindings.Struct { | 577 class Frame extends bindings.Struct { |
551 static const List<bindings.StructDataHeader> kVersions = const [ | 578 static const List<bindings.StructDataHeader> kVersions = const [ |
552 const bindings.StructDataHeader(24, 0) | 579 const bindings.StructDataHeader(24, 0) |
553 ]; | 580 ]; |
554 List<TransferableResource> resources = null; | 581 List<TransferableResource> resources = null; |
555 List<quads_mojom.Pass> passes = null; | 582 List<quads_mojom.Pass> passes = null; |
556 | 583 |
557 Frame() : super(kVersions.last.size); | 584 Frame() : super(kVersions.last.size); |
558 | 585 |
| 586 Frame.init( |
| 587 List<TransferableResource> this.resources, |
| 588 List<quads_mojom.Pass> this.passes |
| 589 ) : super(kVersions.last.size); |
| 590 |
559 static Frame deserialize(bindings.Message message) { | 591 static Frame deserialize(bindings.Message message) { |
560 var decoder = new bindings.Decoder(message); | 592 var decoder = new bindings.Decoder(message); |
561 var result = decode(decoder); | 593 var result = decode(decoder); |
562 if (decoder.excessHandles != null) { | 594 if (decoder.excessHandles != null) { |
563 decoder.excessHandles.forEach((h) => h.close()); | 595 decoder.excessHandles.forEach((h) => h.close()); |
564 } | 596 } |
565 return result; | 597 return result; |
566 } | 598 } |
567 | 599 |
568 static Frame decode(bindings.Decoder decoder0) { | 600 static Frame decode(bindings.Decoder decoder0) { |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 | 698 |
667 | 699 |
668 class _ResourceReturnerReturnResourcesParams extends bindings.Struct { | 700 class _ResourceReturnerReturnResourcesParams extends bindings.Struct { |
669 static const List<bindings.StructDataHeader> kVersions = const [ | 701 static const List<bindings.StructDataHeader> kVersions = const [ |
670 const bindings.StructDataHeader(16, 0) | 702 const bindings.StructDataHeader(16, 0) |
671 ]; | 703 ]; |
672 List<ReturnedResource> resources = null; | 704 List<ReturnedResource> resources = null; |
673 | 705 |
674 _ResourceReturnerReturnResourcesParams() : super(kVersions.last.size); | 706 _ResourceReturnerReturnResourcesParams() : super(kVersions.last.size); |
675 | 707 |
| 708 _ResourceReturnerReturnResourcesParams.init( |
| 709 List<ReturnedResource> this.resources |
| 710 ) : super(kVersions.last.size); |
| 711 |
676 static _ResourceReturnerReturnResourcesParams deserialize(bindings.Message mes
sage) { | 712 static _ResourceReturnerReturnResourcesParams deserialize(bindings.Message mes
sage) { |
677 var decoder = new bindings.Decoder(message); | 713 var decoder = new bindings.Decoder(message); |
678 var result = decode(decoder); | 714 var result = decode(decoder); |
679 if (decoder.excessHandles != null) { | 715 if (decoder.excessHandles != null) { |
680 decoder.excessHandles.forEach((h) => h.close()); | 716 decoder.excessHandles.forEach((h) => h.close()); |
681 } | 717 } |
682 return result; | 718 return result; |
683 } | 719 } |
684 | 720 |
685 static _ResourceReturnerReturnResourcesParams decode(bindings.Decoder decoder0
) { | 721 static _ResourceReturnerReturnResourcesParams decode(bindings.Decoder decoder0
) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
753 } | 789 } |
754 | 790 |
755 | 791 |
756 class _SurfaceGetIdNamespaceParams extends bindings.Struct { | 792 class _SurfaceGetIdNamespaceParams extends bindings.Struct { |
757 static const List<bindings.StructDataHeader> kVersions = const [ | 793 static const List<bindings.StructDataHeader> kVersions = const [ |
758 const bindings.StructDataHeader(8, 0) | 794 const bindings.StructDataHeader(8, 0) |
759 ]; | 795 ]; |
760 | 796 |
761 _SurfaceGetIdNamespaceParams() : super(kVersions.last.size); | 797 _SurfaceGetIdNamespaceParams() : super(kVersions.last.size); |
762 | 798 |
| 799 _SurfaceGetIdNamespaceParams.init( |
| 800 ) : super(kVersions.last.size); |
| 801 |
763 static _SurfaceGetIdNamespaceParams deserialize(bindings.Message message) { | 802 static _SurfaceGetIdNamespaceParams deserialize(bindings.Message message) { |
764 var decoder = new bindings.Decoder(message); | 803 var decoder = new bindings.Decoder(message); |
765 var result = decode(decoder); | 804 var result = decode(decoder); |
766 if (decoder.excessHandles != null) { | 805 if (decoder.excessHandles != null) { |
767 decoder.excessHandles.forEach((h) => h.close()); | 806 decoder.excessHandles.forEach((h) => h.close()); |
768 } | 807 } |
769 return result; | 808 return result; |
770 } | 809 } |
771 | 810 |
772 static _SurfaceGetIdNamespaceParams decode(bindings.Decoder decoder0) { | 811 static _SurfaceGetIdNamespaceParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
812 | 851 |
813 | 852 |
814 class SurfaceGetIdNamespaceResponseParams extends bindings.Struct { | 853 class SurfaceGetIdNamespaceResponseParams extends bindings.Struct { |
815 static const List<bindings.StructDataHeader> kVersions = const [ | 854 static const List<bindings.StructDataHeader> kVersions = const [ |
816 const bindings.StructDataHeader(16, 0) | 855 const bindings.StructDataHeader(16, 0) |
817 ]; | 856 ]; |
818 int idNamespace = 0; | 857 int idNamespace = 0; |
819 | 858 |
820 SurfaceGetIdNamespaceResponseParams() : super(kVersions.last.size); | 859 SurfaceGetIdNamespaceResponseParams() : super(kVersions.last.size); |
821 | 860 |
| 861 SurfaceGetIdNamespaceResponseParams.init( |
| 862 int this.idNamespace |
| 863 ) : super(kVersions.last.size); |
| 864 |
822 static SurfaceGetIdNamespaceResponseParams deserialize(bindings.Message messag
e) { | 865 static SurfaceGetIdNamespaceResponseParams deserialize(bindings.Message messag
e) { |
823 var decoder = new bindings.Decoder(message); | 866 var decoder = new bindings.Decoder(message); |
824 var result = decode(decoder); | 867 var result = decode(decoder); |
825 if (decoder.excessHandles != null) { | 868 if (decoder.excessHandles != null) { |
826 decoder.excessHandles.forEach((h) => h.close()); | 869 decoder.excessHandles.forEach((h) => h.close()); |
827 } | 870 } |
828 return result; | 871 return result; |
829 } | 872 } |
830 | 873 |
831 static SurfaceGetIdNamespaceResponseParams decode(bindings.Decoder decoder0) { | 874 static SurfaceGetIdNamespaceResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 | 927 |
885 | 928 |
886 class _SurfaceSetResourceReturnerParams extends bindings.Struct { | 929 class _SurfaceSetResourceReturnerParams extends bindings.Struct { |
887 static const List<bindings.StructDataHeader> kVersions = const [ | 930 static const List<bindings.StructDataHeader> kVersions = const [ |
888 const bindings.StructDataHeader(16, 0) | 931 const bindings.StructDataHeader(16, 0) |
889 ]; | 932 ]; |
890 ResourceReturnerInterface returner = null; | 933 ResourceReturnerInterface returner = null; |
891 | 934 |
892 _SurfaceSetResourceReturnerParams() : super(kVersions.last.size); | 935 _SurfaceSetResourceReturnerParams() : super(kVersions.last.size); |
893 | 936 |
| 937 _SurfaceSetResourceReturnerParams.init( |
| 938 ResourceReturnerInterface this.returner |
| 939 ) : super(kVersions.last.size); |
| 940 |
894 static _SurfaceSetResourceReturnerParams deserialize(bindings.Message message)
{ | 941 static _SurfaceSetResourceReturnerParams deserialize(bindings.Message message)
{ |
895 var decoder = new bindings.Decoder(message); | 942 var decoder = new bindings.Decoder(message); |
896 var result = decode(decoder); | 943 var result = decode(decoder); |
897 if (decoder.excessHandles != null) { | 944 if (decoder.excessHandles != null) { |
898 decoder.excessHandles.forEach((h) => h.close()); | 945 decoder.excessHandles.forEach((h) => h.close()); |
899 } | 946 } |
900 return result; | 947 return result; |
901 } | 948 } |
902 | 949 |
903 static _SurfaceSetResourceReturnerParams decode(bindings.Decoder decoder0) { | 950 static _SurfaceSetResourceReturnerParams decode(bindings.Decoder decoder0) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
955 | 1002 |
956 | 1003 |
957 class _SurfaceCreateSurfaceParams extends bindings.Struct { | 1004 class _SurfaceCreateSurfaceParams extends bindings.Struct { |
958 static const List<bindings.StructDataHeader> kVersions = const [ | 1005 static const List<bindings.StructDataHeader> kVersions = const [ |
959 const bindings.StructDataHeader(16, 0) | 1006 const bindings.StructDataHeader(16, 0) |
960 ]; | 1007 ]; |
961 int idLocal = 0; | 1008 int idLocal = 0; |
962 | 1009 |
963 _SurfaceCreateSurfaceParams() : super(kVersions.last.size); | 1010 _SurfaceCreateSurfaceParams() : super(kVersions.last.size); |
964 | 1011 |
| 1012 _SurfaceCreateSurfaceParams.init( |
| 1013 int this.idLocal |
| 1014 ) : super(kVersions.last.size); |
| 1015 |
965 static _SurfaceCreateSurfaceParams deserialize(bindings.Message message) { | 1016 static _SurfaceCreateSurfaceParams deserialize(bindings.Message message) { |
966 var decoder = new bindings.Decoder(message); | 1017 var decoder = new bindings.Decoder(message); |
967 var result = decode(decoder); | 1018 var result = decode(decoder); |
968 if (decoder.excessHandles != null) { | 1019 if (decoder.excessHandles != null) { |
969 decoder.excessHandles.forEach((h) => h.close()); | 1020 decoder.excessHandles.forEach((h) => h.close()); |
970 } | 1021 } |
971 return result; | 1022 return result; |
972 } | 1023 } |
973 | 1024 |
974 static _SurfaceCreateSurfaceParams decode(bindings.Decoder decoder0) { | 1025 static _SurfaceCreateSurfaceParams decode(bindings.Decoder decoder0) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1028 | 1079 |
1029 class _SurfaceSubmitFrameParams extends bindings.Struct { | 1080 class _SurfaceSubmitFrameParams extends bindings.Struct { |
1030 static const List<bindings.StructDataHeader> kVersions = const [ | 1081 static const List<bindings.StructDataHeader> kVersions = const [ |
1031 const bindings.StructDataHeader(24, 0) | 1082 const bindings.StructDataHeader(24, 0) |
1032 ]; | 1083 ]; |
1033 int idLocal = 0; | 1084 int idLocal = 0; |
1034 Frame frame = null; | 1085 Frame frame = null; |
1035 | 1086 |
1036 _SurfaceSubmitFrameParams() : super(kVersions.last.size); | 1087 _SurfaceSubmitFrameParams() : super(kVersions.last.size); |
1037 | 1088 |
| 1089 _SurfaceSubmitFrameParams.init( |
| 1090 int this.idLocal, |
| 1091 Frame this.frame |
| 1092 ) : super(kVersions.last.size); |
| 1093 |
1038 static _SurfaceSubmitFrameParams deserialize(bindings.Message message) { | 1094 static _SurfaceSubmitFrameParams deserialize(bindings.Message message) { |
1039 var decoder = new bindings.Decoder(message); | 1095 var decoder = new bindings.Decoder(message); |
1040 var result = decode(decoder); | 1096 var result = decode(decoder); |
1041 if (decoder.excessHandles != null) { | 1097 if (decoder.excessHandles != null) { |
1042 decoder.excessHandles.forEach((h) => h.close()); | 1098 decoder.excessHandles.forEach((h) => h.close()); |
1043 } | 1099 } |
1044 return result; | 1100 return result; |
1045 } | 1101 } |
1046 | 1102 |
1047 static _SurfaceSubmitFrameParams decode(bindings.Decoder decoder0) { | 1103 static _SurfaceSubmitFrameParams decode(bindings.Decoder decoder0) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 } | 1169 } |
1114 | 1170 |
1115 | 1171 |
1116 class SurfaceSubmitFrameResponseParams extends bindings.Struct { | 1172 class SurfaceSubmitFrameResponseParams extends bindings.Struct { |
1117 static const List<bindings.StructDataHeader> kVersions = const [ | 1173 static const List<bindings.StructDataHeader> kVersions = const [ |
1118 const bindings.StructDataHeader(8, 0) | 1174 const bindings.StructDataHeader(8, 0) |
1119 ]; | 1175 ]; |
1120 | 1176 |
1121 SurfaceSubmitFrameResponseParams() : super(kVersions.last.size); | 1177 SurfaceSubmitFrameResponseParams() : super(kVersions.last.size); |
1122 | 1178 |
| 1179 SurfaceSubmitFrameResponseParams.init( |
| 1180 ) : super(kVersions.last.size); |
| 1181 |
1123 static SurfaceSubmitFrameResponseParams deserialize(bindings.Message message)
{ | 1182 static SurfaceSubmitFrameResponseParams deserialize(bindings.Message message)
{ |
1124 var decoder = new bindings.Decoder(message); | 1183 var decoder = new bindings.Decoder(message); |
1125 var result = decode(decoder); | 1184 var result = decode(decoder); |
1126 if (decoder.excessHandles != null) { | 1185 if (decoder.excessHandles != null) { |
1127 decoder.excessHandles.forEach((h) => h.close()); | 1186 decoder.excessHandles.forEach((h) => h.close()); |
1128 } | 1187 } |
1129 return result; | 1188 return result; |
1130 } | 1189 } |
1131 | 1190 |
1132 static SurfaceSubmitFrameResponseParams decode(bindings.Decoder decoder0) { | 1191 static SurfaceSubmitFrameResponseParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 | 1231 |
1173 | 1232 |
1174 class _SurfaceDestroySurfaceParams extends bindings.Struct { | 1233 class _SurfaceDestroySurfaceParams extends bindings.Struct { |
1175 static const List<bindings.StructDataHeader> kVersions = const [ | 1234 static const List<bindings.StructDataHeader> kVersions = const [ |
1176 const bindings.StructDataHeader(16, 0) | 1235 const bindings.StructDataHeader(16, 0) |
1177 ]; | 1236 ]; |
1178 int idLocal = 0; | 1237 int idLocal = 0; |
1179 | 1238 |
1180 _SurfaceDestroySurfaceParams() : super(kVersions.last.size); | 1239 _SurfaceDestroySurfaceParams() : super(kVersions.last.size); |
1181 | 1240 |
| 1241 _SurfaceDestroySurfaceParams.init( |
| 1242 int this.idLocal |
| 1243 ) : super(kVersions.last.size); |
| 1244 |
1182 static _SurfaceDestroySurfaceParams deserialize(bindings.Message message) { | 1245 static _SurfaceDestroySurfaceParams deserialize(bindings.Message message) { |
1183 var decoder = new bindings.Decoder(message); | 1246 var decoder = new bindings.Decoder(message); |
1184 var result = decode(decoder); | 1247 var result = decode(decoder); |
1185 if (decoder.excessHandles != null) { | 1248 if (decoder.excessHandles != null) { |
1186 decoder.excessHandles.forEach((h) => h.close()); | 1249 decoder.excessHandles.forEach((h) => h.close()); |
1187 } | 1250 } |
1188 return result; | 1251 return result; |
1189 } | 1252 } |
1190 | 1253 |
1191 static _SurfaceDestroySurfaceParams decode(bindings.Decoder decoder0) { | 1254 static _SurfaceDestroySurfaceParams decode(bindings.Decoder decoder0) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1238 Map toJson() { | 1301 Map toJson() { |
1239 Map map = new Map(); | 1302 Map map = new Map(); |
1240 map["idLocal"] = idLocal; | 1303 map["idLocal"] = idLocal; |
1241 return map; | 1304 return map; |
1242 } | 1305 } |
1243 } | 1306 } |
1244 | 1307 |
1245 const int _resourceReturnerMethodReturnResourcesName = 0; | 1308 const int _resourceReturnerMethodReturnResourcesName = 0; |
1246 | 1309 |
1247 class _ResourceReturnerServiceDescription implements service_describer.ServiceDe
scription { | 1310 class _ResourceReturnerServiceDescription implements service_describer.ServiceDe
scription { |
1248 dynamic getTopLevelInterface([Function responseFactory]) => | 1311 void getTopLevelInterface(Function responder) { |
1249 responseFactory(null); | 1312 responder(null); |
| 1313 } |
1250 | 1314 |
1251 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1315 void getTypeDefinition(String typeKey, Function responder) { |
1252 responseFactory(null); | 1316 responder(null); |
| 1317 } |
1253 | 1318 |
1254 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1319 void getAllTypeDefinitions(Function responder) { |
1255 responseFactory(null); | 1320 responder(null); |
| 1321 } |
1256 } | 1322 } |
1257 | 1323 |
1258 abstract class ResourceReturner { | 1324 abstract class ResourceReturner { |
1259 static const String serviceName = null; | 1325 static const String serviceName = null; |
1260 | 1326 |
1261 static service_describer.ServiceDescription _cachedServiceDescription; | 1327 static service_describer.ServiceDescription _cachedServiceDescription; |
1262 static service_describer.ServiceDescription get serviceDescription { | 1328 static service_describer.ServiceDescription get serviceDescription { |
1263 if (_cachedServiceDescription == null) { | 1329 if (_cachedServiceDescription == null) { |
1264 _cachedServiceDescription = new _ResourceReturnerServiceDescription(); | 1330 _cachedServiceDescription = new _ResourceReturnerServiceDescription(); |
1265 } | 1331 } |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1395 : super.fromHandle(handle, autoBegin: impl != null) { | 1461 : super.fromHandle(handle, autoBegin: impl != null) { |
1396 _impl = impl; | 1462 _impl = impl; |
1397 } | 1463 } |
1398 | 1464 |
1399 _ResourceReturnerStubControl.unbound([this._impl]) : super.unbound(); | 1465 _ResourceReturnerStubControl.unbound([this._impl]) : super.unbound(); |
1400 | 1466 |
1401 String get serviceName => ResourceReturner.serviceName; | 1467 String get serviceName => ResourceReturner.serviceName; |
1402 | 1468 |
1403 | 1469 |
1404 | 1470 |
1405 dynamic handleMessage(bindings.ServiceMessage message) { | 1471 void handleMessage(bindings.ServiceMessage message) { |
1406 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 1472 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
1407 return bindings.ControlMessageHandler.handleMessage(this, | 1473 bindings.ControlMessageHandler.handleMessage( |
1408 0, | 1474 this, 0, message); |
1409 message); | 1475 return; |
1410 } | 1476 } |
1411 if (_impl == null) { | 1477 if (_impl == null) { |
1412 throw new core.MojoApiError("$this has no implementation set"); | 1478 throw new core.MojoApiError("$this has no implementation set"); |
1413 } | 1479 } |
1414 switch (message.header.type) { | 1480 switch (message.header.type) { |
1415 case _resourceReturnerMethodReturnResourcesName: | 1481 case _resourceReturnerMethodReturnResourcesName: |
1416 var params = _ResourceReturnerReturnResourcesParams.deserialize( | 1482 var params = _ResourceReturnerReturnResourcesParams.deserialize( |
1417 message.payload); | 1483 message.payload); |
1418 _impl.returnResources(params.resources); | 1484 _impl.returnResources(params.resources); |
1419 break; | 1485 break; |
1420 default: | 1486 default: |
1421 throw new bindings.MojoCodecError("Unexpected message name"); | 1487 throw new bindings.MojoCodecError("Unexpected message name"); |
1422 break; | 1488 break; |
1423 } | 1489 } |
1424 return null; | |
1425 } | 1490 } |
1426 | 1491 |
1427 ResourceReturner get impl => _impl; | 1492 ResourceReturner get impl => _impl; |
1428 set impl(ResourceReturner d) { | 1493 set impl(ResourceReturner d) { |
1429 if (d == null) { | 1494 if (d == null) { |
1430 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 1495 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
1431 } | 1496 } |
1432 if (isBound && (_impl == null)) { | 1497 if (isBound && (_impl == null)) { |
1433 beginHandlingEvents(); | 1498 beginHandlingEvents(); |
1434 } | 1499 } |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1480 } | 1545 } |
1481 } | 1546 } |
1482 | 1547 |
1483 const int _surfaceMethodGetIdNamespaceName = 0; | 1548 const int _surfaceMethodGetIdNamespaceName = 0; |
1484 const int _surfaceMethodSetResourceReturnerName = 1; | 1549 const int _surfaceMethodSetResourceReturnerName = 1; |
1485 const int _surfaceMethodCreateSurfaceName = 2; | 1550 const int _surfaceMethodCreateSurfaceName = 2; |
1486 const int _surfaceMethodSubmitFrameName = 3; | 1551 const int _surfaceMethodSubmitFrameName = 3; |
1487 const int _surfaceMethodDestroySurfaceName = 4; | 1552 const int _surfaceMethodDestroySurfaceName = 4; |
1488 | 1553 |
1489 class _SurfaceServiceDescription implements service_describer.ServiceDescription
{ | 1554 class _SurfaceServiceDescription implements service_describer.ServiceDescription
{ |
1490 dynamic getTopLevelInterface([Function responseFactory]) => | 1555 void getTopLevelInterface(Function responder) { |
1491 responseFactory(null); | 1556 responder(null); |
| 1557 } |
1492 | 1558 |
1493 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1559 void getTypeDefinition(String typeKey, Function responder) { |
1494 responseFactory(null); | 1560 responder(null); |
| 1561 } |
1495 | 1562 |
1496 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1563 void getAllTypeDefinitions(Function responder) { |
1497 responseFactory(null); | 1564 responder(null); |
| 1565 } |
1498 } | 1566 } |
1499 | 1567 |
1500 abstract class Surface { | 1568 abstract class Surface { |
1501 static const String serviceName = "mojo::Surface"; | 1569 static const String serviceName = "mojo::Surface"; |
1502 | 1570 |
1503 static service_describer.ServiceDescription _cachedServiceDescription; | 1571 static service_describer.ServiceDescription _cachedServiceDescription; |
1504 static service_describer.ServiceDescription get serviceDescription { | 1572 static service_describer.ServiceDescription get serviceDescription { |
1505 if (_cachedServiceDescription == null) { | 1573 if (_cachedServiceDescription == null) { |
1506 _cachedServiceDescription = new _SurfaceServiceDescription(); | 1574 _cachedServiceDescription = new _SurfaceServiceDescription(); |
1507 } | 1575 } |
1508 return _cachedServiceDescription; | 1576 return _cachedServiceDescription; |
1509 } | 1577 } |
1510 | 1578 |
1511 static SurfaceProxy connectToService( | 1579 static SurfaceProxy connectToService( |
1512 bindings.ServiceConnector s, String url, [String serviceName]) { | 1580 bindings.ServiceConnector s, String url, [String serviceName]) { |
1513 SurfaceProxy p = new SurfaceProxy.unbound(); | 1581 SurfaceProxy p = new SurfaceProxy.unbound(); |
1514 String name = serviceName ?? Surface.serviceName; | 1582 String name = serviceName ?? Surface.serviceName; |
1515 if ((name == null) || name.isEmpty) { | 1583 if ((name == null) || name.isEmpty) { |
1516 throw new core.MojoApiError( | 1584 throw new core.MojoApiError( |
1517 "If an interface has no ServiceName, then one must be provided."); | 1585 "If an interface has no ServiceName, then one must be provided."); |
1518 } | 1586 } |
1519 s.connectToService(url, p, name); | 1587 s.connectToService(url, p, name); |
1520 return p; | 1588 return p; |
1521 } | 1589 } |
1522 dynamic getIdNamespace([Function responseFactory = null]); | 1590 void getIdNamespace(void callback(int idNamespace)); |
1523 void setResourceReturner(ResourceReturnerInterface returner); | 1591 void setResourceReturner(ResourceReturnerInterface returner); |
1524 void createSurface(int idLocal); | 1592 void createSurface(int idLocal); |
1525 dynamic submitFrame(int idLocal,Frame frame,[Function responseFactory = null])
; | 1593 void submitFrame(int idLocal,Frame frame,void callback()); |
1526 void destroySurface(int idLocal); | 1594 void destroySurface(int idLocal); |
1527 } | 1595 } |
1528 | 1596 |
1529 abstract class SurfaceInterface | 1597 abstract class SurfaceInterface |
1530 implements bindings.MojoInterface<Surface>, | 1598 implements bindings.MojoInterface<Surface>, |
1531 Surface { | 1599 Surface { |
1532 factory SurfaceInterface([Surface impl]) => | 1600 factory SurfaceInterface([Surface impl]) => |
1533 new SurfaceStub.unbound(impl); | 1601 new SurfaceStub.unbound(impl); |
1534 | 1602 |
1535 factory SurfaceInterface.fromEndpoint( | 1603 factory SurfaceInterface.fromEndpoint( |
(...skipping 30 matching lines...) Expand all Loading... |
1566 | 1634 |
1567 void handleResponse(bindings.ServiceMessage message) { | 1635 void handleResponse(bindings.ServiceMessage message) { |
1568 switch (message.header.type) { | 1636 switch (message.header.type) { |
1569 case _surfaceMethodGetIdNamespaceName: | 1637 case _surfaceMethodGetIdNamespaceName: |
1570 var r = SurfaceGetIdNamespaceResponseParams.deserialize( | 1638 var r = SurfaceGetIdNamespaceResponseParams.deserialize( |
1571 message.payload); | 1639 message.payload); |
1572 if (!message.header.hasRequestId) { | 1640 if (!message.header.hasRequestId) { |
1573 proxyError("Expected a message with a valid request Id."); | 1641 proxyError("Expected a message with a valid request Id."); |
1574 return; | 1642 return; |
1575 } | 1643 } |
1576 Completer c = completerMap[message.header.requestId]; | 1644 Function callback = callbackMap[message.header.requestId]; |
1577 if (c == null) { | 1645 if (callback == null) { |
1578 proxyError( | 1646 proxyError( |
1579 "Message had unknown request Id: ${message.header.requestId}"); | 1647 "Message had unknown request Id: ${message.header.requestId}"); |
1580 return; | 1648 return; |
1581 } | 1649 } |
1582 completerMap.remove(message.header.requestId); | 1650 callbackMap.remove(message.header.requestId); |
1583 if (c.isCompleted) { | 1651 callback(r.idNamespace ); |
1584 proxyError("Response completer already completed"); | |
1585 return; | |
1586 } | |
1587 c.complete(r); | |
1588 break; | 1652 break; |
1589 case _surfaceMethodSubmitFrameName: | 1653 case _surfaceMethodSubmitFrameName: |
1590 var r = SurfaceSubmitFrameResponseParams.deserialize( | 1654 var r = SurfaceSubmitFrameResponseParams.deserialize( |
1591 message.payload); | 1655 message.payload); |
1592 if (!message.header.hasRequestId) { | 1656 if (!message.header.hasRequestId) { |
1593 proxyError("Expected a message with a valid request Id."); | 1657 proxyError("Expected a message with a valid request Id."); |
1594 return; | 1658 return; |
1595 } | 1659 } |
1596 Completer c = completerMap[message.header.requestId]; | 1660 Function callback = callbackMap[message.header.requestId]; |
1597 if (c == null) { | 1661 if (callback == null) { |
1598 proxyError( | 1662 proxyError( |
1599 "Message had unknown request Id: ${message.header.requestId}"); | 1663 "Message had unknown request Id: ${message.header.requestId}"); |
1600 return; | 1664 return; |
1601 } | 1665 } |
1602 completerMap.remove(message.header.requestId); | 1666 callbackMap.remove(message.header.requestId); |
1603 if (c.isCompleted) { | 1667 callback(); |
1604 proxyError("Response completer already completed"); | |
1605 return; | |
1606 } | |
1607 c.complete(r); | |
1608 break; | 1668 break; |
1609 default: | 1669 default: |
1610 proxyError("Unexpected message type: ${message.header.type}"); | 1670 proxyError("Unexpected message type: ${message.header.type}"); |
1611 close(immediate: true); | 1671 close(immediate: true); |
1612 break; | 1672 break; |
1613 } | 1673 } |
1614 } | 1674 } |
1615 | 1675 |
1616 @override | 1676 @override |
1617 String toString() { | 1677 String toString() { |
(...skipping 24 matching lines...) Expand all Loading... |
1642 return newMockedProxy; | 1702 return newMockedProxy; |
1643 } | 1703 } |
1644 | 1704 |
1645 static SurfaceProxy newFromEndpoint( | 1705 static SurfaceProxy newFromEndpoint( |
1646 core.MojoMessagePipeEndpoint endpoint) { | 1706 core.MojoMessagePipeEndpoint endpoint) { |
1647 assert(endpoint.setDescription("For SurfaceProxy")); | 1707 assert(endpoint.setDescription("For SurfaceProxy")); |
1648 return new SurfaceProxy.fromEndpoint(endpoint); | 1708 return new SurfaceProxy.fromEndpoint(endpoint); |
1649 } | 1709 } |
1650 | 1710 |
1651 | 1711 |
1652 dynamic getIdNamespace([Function responseFactory = null]) { | 1712 void getIdNamespace(void callback(int idNamespace)) { |
1653 if (impl != null) { | 1713 if (impl != null) { |
1654 return new Future(() => impl.getIdNamespace(_SurfaceStubControl._surfaceGe
tIdNamespaceResponseParamsFactory)); | 1714 impl.getIdNamespace(callback); |
| 1715 return; |
1655 } | 1716 } |
1656 var params = new _SurfaceGetIdNamespaceParams(); | 1717 var params = new _SurfaceGetIdNamespaceParams(); |
1657 return ctrl.sendMessageWithRequestId( | 1718 ctrl.sendMessageWithRequestId( |
1658 params, | 1719 params, |
1659 _surfaceMethodGetIdNamespaceName, | 1720 _surfaceMethodGetIdNamespaceName, |
1660 -1, | 1721 -1, |
1661 bindings.MessageHeader.kMessageExpectsResponse); | 1722 bindings.MessageHeader.kMessageExpectsResponse, |
| 1723 callback); |
1662 } | 1724 } |
1663 void setResourceReturner(ResourceReturnerInterface returner) { | 1725 void setResourceReturner(ResourceReturnerInterface returner) { |
1664 if (impl != null) { | 1726 if (impl != null) { |
1665 impl.setResourceReturner(returner); | 1727 impl.setResourceReturner(returner); |
1666 return; | 1728 return; |
1667 } | 1729 } |
1668 if (!ctrl.isBound) { | 1730 if (!ctrl.isBound) { |
1669 ctrl.proxyError("The Proxy is closed."); | 1731 ctrl.proxyError("The Proxy is closed."); |
1670 return; | 1732 return; |
1671 } | 1733 } |
1672 var params = new _SurfaceSetResourceReturnerParams(); | 1734 var params = new _SurfaceSetResourceReturnerParams(); |
1673 params.returner = returner; | 1735 params.returner = returner; |
1674 ctrl.sendMessage(params, | 1736 ctrl.sendMessage(params, |
1675 _surfaceMethodSetResourceReturnerName); | 1737 _surfaceMethodSetResourceReturnerName); |
1676 } | 1738 } |
1677 void createSurface(int idLocal) { | 1739 void createSurface(int idLocal) { |
1678 if (impl != null) { | 1740 if (impl != null) { |
1679 impl.createSurface(idLocal); | 1741 impl.createSurface(idLocal); |
1680 return; | 1742 return; |
1681 } | 1743 } |
1682 if (!ctrl.isBound) { | 1744 if (!ctrl.isBound) { |
1683 ctrl.proxyError("The Proxy is closed."); | 1745 ctrl.proxyError("The Proxy is closed."); |
1684 return; | 1746 return; |
1685 } | 1747 } |
1686 var params = new _SurfaceCreateSurfaceParams(); | 1748 var params = new _SurfaceCreateSurfaceParams(); |
1687 params.idLocal = idLocal; | 1749 params.idLocal = idLocal; |
1688 ctrl.sendMessage(params, | 1750 ctrl.sendMessage(params, |
1689 _surfaceMethodCreateSurfaceName); | 1751 _surfaceMethodCreateSurfaceName); |
1690 } | 1752 } |
1691 dynamic submitFrame(int idLocal,Frame frame,[Function responseFactory = null])
{ | 1753 void submitFrame(int idLocal,Frame frame,void callback()) { |
1692 if (impl != null) { | 1754 if (impl != null) { |
1693 return new Future(() => impl.submitFrame(idLocal,frame,_SurfaceStubControl
._surfaceSubmitFrameResponseParamsFactory)); | 1755 impl.submitFrame(idLocal,frame,callback); |
| 1756 return; |
1694 } | 1757 } |
1695 var params = new _SurfaceSubmitFrameParams(); | 1758 var params = new _SurfaceSubmitFrameParams(); |
1696 params.idLocal = idLocal; | 1759 params.idLocal = idLocal; |
1697 params.frame = frame; | 1760 params.frame = frame; |
1698 return ctrl.sendMessageWithRequestId( | 1761 ctrl.sendMessageWithRequestId( |
1699 params, | 1762 params, |
1700 _surfaceMethodSubmitFrameName, | 1763 _surfaceMethodSubmitFrameName, |
1701 -1, | 1764 -1, |
1702 bindings.MessageHeader.kMessageExpectsResponse); | 1765 bindings.MessageHeader.kMessageExpectsResponse, |
| 1766 callback); |
1703 } | 1767 } |
1704 void destroySurface(int idLocal) { | 1768 void destroySurface(int idLocal) { |
1705 if (impl != null) { | 1769 if (impl != null) { |
1706 impl.destroySurface(idLocal); | 1770 impl.destroySurface(idLocal); |
1707 return; | 1771 return; |
1708 } | 1772 } |
1709 if (!ctrl.isBound) { | 1773 if (!ctrl.isBound) { |
1710 ctrl.proxyError("The Proxy is closed."); | 1774 ctrl.proxyError("The Proxy is closed."); |
1711 return; | 1775 return; |
1712 } | 1776 } |
(...skipping 19 matching lines...) Expand all Loading... |
1732 core.MojoHandle handle, [Surface impl]) | 1796 core.MojoHandle handle, [Surface impl]) |
1733 : super.fromHandle(handle, autoBegin: impl != null) { | 1797 : super.fromHandle(handle, autoBegin: impl != null) { |
1734 _impl = impl; | 1798 _impl = impl; |
1735 } | 1799 } |
1736 | 1800 |
1737 _SurfaceStubControl.unbound([this._impl]) : super.unbound(); | 1801 _SurfaceStubControl.unbound([this._impl]) : super.unbound(); |
1738 | 1802 |
1739 String get serviceName => Surface.serviceName; | 1803 String get serviceName => Surface.serviceName; |
1740 | 1804 |
1741 | 1805 |
1742 static SurfaceGetIdNamespaceResponseParams _surfaceGetIdNamespaceResponseParam
sFactory(int idNamespace) { | 1806 Function _surfaceGetIdNamespaceResponseParamsResponder( |
1743 var result = new SurfaceGetIdNamespaceResponseParams(); | 1807 int requestId) { |
1744 result.idNamespace = idNamespace; | 1808 return (int idNamespace) { |
1745 return result; | 1809 var result = new SurfaceGetIdNamespaceResponseParams(); |
| 1810 result.idNamespace = idNamespace; |
| 1811 sendResponse(buildResponseWithId( |
| 1812 result, |
| 1813 _surfaceMethodGetIdNamespaceName, |
| 1814 requestId, |
| 1815 bindings.MessageHeader.kMessageIsResponse)); |
| 1816 }; |
1746 } | 1817 } |
1747 static SurfaceSubmitFrameResponseParams _surfaceSubmitFrameResponseParamsFacto
ry() { | 1818 Function _surfaceSubmitFrameResponseParamsResponder( |
1748 var result = new SurfaceSubmitFrameResponseParams(); | 1819 int requestId) { |
1749 return result; | 1820 return () { |
| 1821 var result = new SurfaceSubmitFrameResponseParams(); |
| 1822 sendResponse(buildResponseWithId( |
| 1823 result, |
| 1824 _surfaceMethodSubmitFrameName, |
| 1825 requestId, |
| 1826 bindings.MessageHeader.kMessageIsResponse)); |
| 1827 }; |
1750 } | 1828 } |
1751 | 1829 |
1752 dynamic handleMessage(bindings.ServiceMessage message) { | 1830 void handleMessage(bindings.ServiceMessage message) { |
1753 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 1831 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
1754 return bindings.ControlMessageHandler.handleMessage(this, | 1832 bindings.ControlMessageHandler.handleMessage( |
1755 0, | 1833 this, 0, message); |
1756 message); | 1834 return; |
1757 } | 1835 } |
1758 if (_impl == null) { | 1836 if (_impl == null) { |
1759 throw new core.MojoApiError("$this has no implementation set"); | 1837 throw new core.MojoApiError("$this has no implementation set"); |
1760 } | 1838 } |
1761 switch (message.header.type) { | 1839 switch (message.header.type) { |
1762 case _surfaceMethodGetIdNamespaceName: | 1840 case _surfaceMethodGetIdNamespaceName: |
1763 var response = _impl.getIdNamespace(_surfaceGetIdNamespaceResponseParams
Factory); | 1841 _impl.getIdNamespace(_surfaceGetIdNamespaceResponseParamsResponder(messa
ge.header.requestId)); |
1764 if (response is Future) { | |
1765 return response.then((response) { | |
1766 if (response != null) { | |
1767 return buildResponseWithId( | |
1768 response, | |
1769 _surfaceMethodGetIdNamespaceName, | |
1770 message.header.requestId, | |
1771 bindings.MessageHeader.kMessageIsResponse); | |
1772 } | |
1773 }); | |
1774 } else if (response != null) { | |
1775 return buildResponseWithId( | |
1776 response, | |
1777 _surfaceMethodGetIdNamespaceName, | |
1778 message.header.requestId, | |
1779 bindings.MessageHeader.kMessageIsResponse); | |
1780 } | |
1781 break; | 1842 break; |
1782 case _surfaceMethodSetResourceReturnerName: | 1843 case _surfaceMethodSetResourceReturnerName: |
1783 var params = _SurfaceSetResourceReturnerParams.deserialize( | 1844 var params = _SurfaceSetResourceReturnerParams.deserialize( |
1784 message.payload); | 1845 message.payload); |
1785 _impl.setResourceReturner(params.returner); | 1846 _impl.setResourceReturner(params.returner); |
1786 break; | 1847 break; |
1787 case _surfaceMethodCreateSurfaceName: | 1848 case _surfaceMethodCreateSurfaceName: |
1788 var params = _SurfaceCreateSurfaceParams.deserialize( | 1849 var params = _SurfaceCreateSurfaceParams.deserialize( |
1789 message.payload); | 1850 message.payload); |
1790 _impl.createSurface(params.idLocal); | 1851 _impl.createSurface(params.idLocal); |
1791 break; | 1852 break; |
1792 case _surfaceMethodSubmitFrameName: | 1853 case _surfaceMethodSubmitFrameName: |
1793 var params = _SurfaceSubmitFrameParams.deserialize( | 1854 var params = _SurfaceSubmitFrameParams.deserialize( |
1794 message.payload); | 1855 message.payload); |
1795 var response = _impl.submitFrame(params.idLocal,params.frame,_surfaceSub
mitFrameResponseParamsFactory); | 1856 _impl.submitFrame(params.idLocal, params.frame, _surfaceSubmitFrameRespo
nseParamsResponder(message.header.requestId)); |
1796 if (response is Future) { | |
1797 return response.then((response) { | |
1798 if (response != null) { | |
1799 return buildResponseWithId( | |
1800 response, | |
1801 _surfaceMethodSubmitFrameName, | |
1802 message.header.requestId, | |
1803 bindings.MessageHeader.kMessageIsResponse); | |
1804 } | |
1805 }); | |
1806 } else if (response != null) { | |
1807 return buildResponseWithId( | |
1808 response, | |
1809 _surfaceMethodSubmitFrameName, | |
1810 message.header.requestId, | |
1811 bindings.MessageHeader.kMessageIsResponse); | |
1812 } | |
1813 break; | 1857 break; |
1814 case _surfaceMethodDestroySurfaceName: | 1858 case _surfaceMethodDestroySurfaceName: |
1815 var params = _SurfaceDestroySurfaceParams.deserialize( | 1859 var params = _SurfaceDestroySurfaceParams.deserialize( |
1816 message.payload); | 1860 message.payload); |
1817 _impl.destroySurface(params.idLocal); | 1861 _impl.destroySurface(params.idLocal); |
1818 break; | 1862 break; |
1819 default: | 1863 default: |
1820 throw new bindings.MojoCodecError("Unexpected message name"); | 1864 throw new bindings.MojoCodecError("Unexpected message name"); |
1821 break; | 1865 break; |
1822 } | 1866 } |
1823 return null; | |
1824 } | 1867 } |
1825 | 1868 |
1826 Surface get impl => _impl; | 1869 Surface get impl => _impl; |
1827 set impl(Surface d) { | 1870 set impl(Surface d) { |
1828 if (d == null) { | 1871 if (d == null) { |
1829 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 1872 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
1830 } | 1873 } |
1831 if (isBound && (_impl == null)) { | 1874 if (isBound && (_impl == null)) { |
1832 beginHandlingEvents(); | 1875 beginHandlingEvents(); |
1833 } | 1876 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1867 core.MojoHandle handle, [Surface impl]) | 1910 core.MojoHandle handle, [Surface impl]) |
1868 : super(new _SurfaceStubControl.fromHandle(handle, impl)); | 1911 : super(new _SurfaceStubControl.fromHandle(handle, impl)); |
1869 | 1912 |
1870 static SurfaceStub newFromEndpoint( | 1913 static SurfaceStub newFromEndpoint( |
1871 core.MojoMessagePipeEndpoint endpoint) { | 1914 core.MojoMessagePipeEndpoint endpoint) { |
1872 assert(endpoint.setDescription("For SurfaceStub")); | 1915 assert(endpoint.setDescription("For SurfaceStub")); |
1873 return new SurfaceStub.fromEndpoint(endpoint); | 1916 return new SurfaceStub.fromEndpoint(endpoint); |
1874 } | 1917 } |
1875 | 1918 |
1876 | 1919 |
1877 dynamic getIdNamespace([Function responseFactory = null]) { | 1920 void getIdNamespace(void callback(int idNamespace)) { |
1878 return impl.getIdNamespace(responseFactory); | 1921 return impl.getIdNamespace(callback); |
1879 } | 1922 } |
1880 void setResourceReturner(ResourceReturnerInterface returner) { | 1923 void setResourceReturner(ResourceReturnerInterface returner) { |
1881 return impl.setResourceReturner(returner); | 1924 return impl.setResourceReturner(returner); |
1882 } | 1925 } |
1883 void createSurface(int idLocal) { | 1926 void createSurface(int idLocal) { |
1884 return impl.createSurface(idLocal); | 1927 return impl.createSurface(idLocal); |
1885 } | 1928 } |
1886 dynamic submitFrame(int idLocal,Frame frame,[Function responseFactory = null])
{ | 1929 void submitFrame(int idLocal,Frame frame,void callback()) { |
1887 return impl.submitFrame(idLocal,frame,responseFactory); | 1930 return impl.submitFrame(idLocal,frame,callback); |
1888 } | 1931 } |
1889 void destroySurface(int idLocal) { | 1932 void destroySurface(int idLocal) { |
1890 return impl.destroySurface(idLocal); | 1933 return impl.destroySurface(idLocal); |
1891 } | 1934 } |
1892 } | 1935 } |
1893 | 1936 |
1894 | 1937 |
1895 | 1938 |
OLD | NEW |