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 activity_mojom; | 5 library activity_mojom; |
6 import 'dart:async'; | 6 import 'dart:async'; |
7 import 'package:mojo/bindings.dart' as bindings; | 7 import 'package:mojo/bindings.dart' as bindings; |
8 import 'package:mojo/core.dart' as core; | 8 import 'package:mojo/core.dart' as core; |
9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; | 9 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
10 | 10 |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 class StringExtra extends bindings.Struct { | 277 class StringExtra extends bindings.Struct { |
278 static const List<bindings.StructDataHeader> kVersions = const [ | 278 static const List<bindings.StructDataHeader> kVersions = const [ |
279 const bindings.StructDataHeader(24, 0) | 279 const bindings.StructDataHeader(24, 0) |
280 ]; | 280 ]; |
281 String name = null; | 281 String name = null; |
282 String value = null; | 282 String value = null; |
283 | 283 |
284 StringExtra() : super(kVersions.last.size); | 284 StringExtra() : super(kVersions.last.size); |
285 | 285 |
| 286 StringExtra.init( |
| 287 String this.name, |
| 288 String this.value |
| 289 ) : super(kVersions.last.size); |
| 290 |
286 static StringExtra deserialize(bindings.Message message) { | 291 static StringExtra deserialize(bindings.Message message) { |
287 var decoder = new bindings.Decoder(message); | 292 var decoder = new bindings.Decoder(message); |
288 var result = decode(decoder); | 293 var result = decode(decoder); |
289 if (decoder.excessHandles != null) { | 294 if (decoder.excessHandles != null) { |
290 decoder.excessHandles.forEach((h) => h.close()); | 295 decoder.excessHandles.forEach((h) => h.close()); |
291 } | 296 } |
292 return result; | 297 return result; |
293 } | 298 } |
294 | 299 |
295 static StringExtra decode(bindings.Decoder decoder0) { | 300 static StringExtra decode(bindings.Decoder decoder0) { |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 | 367 |
363 class ComponentName extends bindings.Struct { | 368 class ComponentName extends bindings.Struct { |
364 static const List<bindings.StructDataHeader> kVersions = const [ | 369 static const List<bindings.StructDataHeader> kVersions = const [ |
365 const bindings.StructDataHeader(24, 0) | 370 const bindings.StructDataHeader(24, 0) |
366 ]; | 371 ]; |
367 String packageName = null; | 372 String packageName = null; |
368 String className = null; | 373 String className = null; |
369 | 374 |
370 ComponentName() : super(kVersions.last.size); | 375 ComponentName() : super(kVersions.last.size); |
371 | 376 |
| 377 ComponentName.init( |
| 378 String this.packageName, |
| 379 String this.className |
| 380 ) : super(kVersions.last.size); |
| 381 |
372 static ComponentName deserialize(bindings.Message message) { | 382 static ComponentName deserialize(bindings.Message message) { |
373 var decoder = new bindings.Decoder(message); | 383 var decoder = new bindings.Decoder(message); |
374 var result = decode(decoder); | 384 var result = decode(decoder); |
375 if (decoder.excessHandles != null) { | 385 if (decoder.excessHandles != null) { |
376 decoder.excessHandles.forEach((h) => h.close()); | 386 decoder.excessHandles.forEach((h) => h.close()); |
377 } | 387 } |
378 return result; | 388 return result; |
379 } | 389 } |
380 | 390 |
381 static ComponentName decode(bindings.Decoder decoder0) { | 391 static ComponentName decode(bindings.Decoder decoder0) { |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 ]; | 462 ]; |
453 String action = null; | 463 String action = null; |
454 String url = null; | 464 String url = null; |
455 int flags = 0; | 465 int flags = 0; |
456 ComponentName component = null; | 466 ComponentName component = null; |
457 List<StringExtra> stringExtras = null; | 467 List<StringExtra> stringExtras = null; |
458 String type = null; | 468 String type = null; |
459 | 469 |
460 Intent() : super(kVersions.last.size); | 470 Intent() : super(kVersions.last.size); |
461 | 471 |
| 472 Intent.init( |
| 473 String this.action, |
| 474 String this.url, |
| 475 int this.flags, |
| 476 ComponentName this.component, |
| 477 List<StringExtra> this.stringExtras, |
| 478 String this.type |
| 479 ) : super(kVersions.last.size); |
| 480 |
462 static Intent deserialize(bindings.Message message) { | 481 static Intent deserialize(bindings.Message message) { |
463 var decoder = new bindings.Decoder(message); | 482 var decoder = new bindings.Decoder(message); |
464 var result = decode(decoder); | 483 var result = decode(decoder); |
465 if (decoder.excessHandles != null) { | 484 if (decoder.excessHandles != null) { |
466 decoder.excessHandles.forEach((h) => h.close()); | 485 decoder.excessHandles.forEach((h) => h.close()); |
467 } | 486 } |
468 return result; | 487 return result; |
469 } | 488 } |
470 | 489 |
471 static Intent decode(bindings.Decoder decoder0) { | 490 static Intent decode(bindings.Decoder decoder0) { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
609 | 628 |
610 class TaskDescription extends bindings.Struct { | 629 class TaskDescription extends bindings.Struct { |
611 static const List<bindings.StructDataHeader> kVersions = const [ | 630 static const List<bindings.StructDataHeader> kVersions = const [ |
612 const bindings.StructDataHeader(24, 0) | 631 const bindings.StructDataHeader(24, 0) |
613 ]; | 632 ]; |
614 String label = null; | 633 String label = null; |
615 int primaryColor = 0; | 634 int primaryColor = 0; |
616 | 635 |
617 TaskDescription() : super(kVersions.last.size); | 636 TaskDescription() : super(kVersions.last.size); |
618 | 637 |
| 638 TaskDescription.init( |
| 639 String this.label, |
| 640 int this.primaryColor |
| 641 ) : super(kVersions.last.size); |
| 642 |
619 static TaskDescription deserialize(bindings.Message message) { | 643 static TaskDescription deserialize(bindings.Message message) { |
620 var decoder = new bindings.Decoder(message); | 644 var decoder = new bindings.Decoder(message); |
621 var result = decode(decoder); | 645 var result = decode(decoder); |
622 if (decoder.excessHandles != null) { | 646 if (decoder.excessHandles != null) { |
623 decoder.excessHandles.forEach((h) => h.close()); | 647 decoder.excessHandles.forEach((h) => h.close()); |
624 } | 648 } |
625 return result; | 649 return result; |
626 } | 650 } |
627 | 651 |
628 static TaskDescription decode(bindings.Decoder decoder0) { | 652 static TaskDescription decode(bindings.Decoder decoder0) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
694 | 718 |
695 | 719 |
696 class _ActivityGetUserFeedbackParams extends bindings.Struct { | 720 class _ActivityGetUserFeedbackParams extends bindings.Struct { |
697 static const List<bindings.StructDataHeader> kVersions = const [ | 721 static const List<bindings.StructDataHeader> kVersions = const [ |
698 const bindings.StructDataHeader(16, 0) | 722 const bindings.StructDataHeader(16, 0) |
699 ]; | 723 ]; |
700 UserFeedbackInterfaceRequest userFeedback = null; | 724 UserFeedbackInterfaceRequest userFeedback = null; |
701 | 725 |
702 _ActivityGetUserFeedbackParams() : super(kVersions.last.size); | 726 _ActivityGetUserFeedbackParams() : super(kVersions.last.size); |
703 | 727 |
| 728 _ActivityGetUserFeedbackParams.init( |
| 729 UserFeedbackInterfaceRequest this.userFeedback |
| 730 ) : super(kVersions.last.size); |
| 731 |
704 static _ActivityGetUserFeedbackParams deserialize(bindings.Message message) { | 732 static _ActivityGetUserFeedbackParams deserialize(bindings.Message message) { |
705 var decoder = new bindings.Decoder(message); | 733 var decoder = new bindings.Decoder(message); |
706 var result = decode(decoder); | 734 var result = decode(decoder); |
707 if (decoder.excessHandles != null) { | 735 if (decoder.excessHandles != null) { |
708 decoder.excessHandles.forEach((h) => h.close()); | 736 decoder.excessHandles.forEach((h) => h.close()); |
709 } | 737 } |
710 return result; | 738 return result; |
711 } | 739 } |
712 | 740 |
713 static _ActivityGetUserFeedbackParams decode(bindings.Decoder decoder0) { | 741 static _ActivityGetUserFeedbackParams decode(bindings.Decoder decoder0) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 | 793 |
766 | 794 |
767 class _ActivityStartActivityParams extends bindings.Struct { | 795 class _ActivityStartActivityParams extends bindings.Struct { |
768 static const List<bindings.StructDataHeader> kVersions = const [ | 796 static const List<bindings.StructDataHeader> kVersions = const [ |
769 const bindings.StructDataHeader(16, 0) | 797 const bindings.StructDataHeader(16, 0) |
770 ]; | 798 ]; |
771 Intent intent = null; | 799 Intent intent = null; |
772 | 800 |
773 _ActivityStartActivityParams() : super(kVersions.last.size); | 801 _ActivityStartActivityParams() : super(kVersions.last.size); |
774 | 802 |
| 803 _ActivityStartActivityParams.init( |
| 804 Intent this.intent |
| 805 ) : super(kVersions.last.size); |
| 806 |
775 static _ActivityStartActivityParams deserialize(bindings.Message message) { | 807 static _ActivityStartActivityParams deserialize(bindings.Message message) { |
776 var decoder = new bindings.Decoder(message); | 808 var decoder = new bindings.Decoder(message); |
777 var result = decode(decoder); | 809 var result = decode(decoder); |
778 if (decoder.excessHandles != null) { | 810 if (decoder.excessHandles != null) { |
779 decoder.excessHandles.forEach((h) => h.close()); | 811 decoder.excessHandles.forEach((h) => h.close()); |
780 } | 812 } |
781 return result; | 813 return result; |
782 } | 814 } |
783 | 815 |
784 static _ActivityStartActivityParams decode(bindings.Decoder decoder0) { | 816 static _ActivityStartActivityParams decode(bindings.Decoder decoder0) { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 } | 869 } |
838 | 870 |
839 | 871 |
840 class _ActivityFinishCurrentActivityParams extends bindings.Struct { | 872 class _ActivityFinishCurrentActivityParams extends bindings.Struct { |
841 static const List<bindings.StructDataHeader> kVersions = const [ | 873 static const List<bindings.StructDataHeader> kVersions = const [ |
842 const bindings.StructDataHeader(8, 0) | 874 const bindings.StructDataHeader(8, 0) |
843 ]; | 875 ]; |
844 | 876 |
845 _ActivityFinishCurrentActivityParams() : super(kVersions.last.size); | 877 _ActivityFinishCurrentActivityParams() : super(kVersions.last.size); |
846 | 878 |
| 879 _ActivityFinishCurrentActivityParams.init( |
| 880 ) : super(kVersions.last.size); |
| 881 |
847 static _ActivityFinishCurrentActivityParams deserialize(bindings.Message messa
ge) { | 882 static _ActivityFinishCurrentActivityParams deserialize(bindings.Message messa
ge) { |
848 var decoder = new bindings.Decoder(message); | 883 var decoder = new bindings.Decoder(message); |
849 var result = decode(decoder); | 884 var result = decode(decoder); |
850 if (decoder.excessHandles != null) { | 885 if (decoder.excessHandles != null) { |
851 decoder.excessHandles.forEach((h) => h.close()); | 886 decoder.excessHandles.forEach((h) => h.close()); |
852 } | 887 } |
853 return result; | 888 return result; |
854 } | 889 } |
855 | 890 |
856 static _ActivityFinishCurrentActivityParams decode(bindings.Decoder decoder0)
{ | 891 static _ActivityFinishCurrentActivityParams decode(bindings.Decoder decoder0)
{ |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 | 931 |
897 | 932 |
898 class _ActivitySetTaskDescriptionParams extends bindings.Struct { | 933 class _ActivitySetTaskDescriptionParams extends bindings.Struct { |
899 static const List<bindings.StructDataHeader> kVersions = const [ | 934 static const List<bindings.StructDataHeader> kVersions = const [ |
900 const bindings.StructDataHeader(16, 0) | 935 const bindings.StructDataHeader(16, 0) |
901 ]; | 936 ]; |
902 TaskDescription description = null; | 937 TaskDescription description = null; |
903 | 938 |
904 _ActivitySetTaskDescriptionParams() : super(kVersions.last.size); | 939 _ActivitySetTaskDescriptionParams() : super(kVersions.last.size); |
905 | 940 |
| 941 _ActivitySetTaskDescriptionParams.init( |
| 942 TaskDescription this.description |
| 943 ) : super(kVersions.last.size); |
| 944 |
906 static _ActivitySetTaskDescriptionParams deserialize(bindings.Message message)
{ | 945 static _ActivitySetTaskDescriptionParams deserialize(bindings.Message message)
{ |
907 var decoder = new bindings.Decoder(message); | 946 var decoder = new bindings.Decoder(message); |
908 var result = decode(decoder); | 947 var result = decode(decoder); |
909 if (decoder.excessHandles != null) { | 948 if (decoder.excessHandles != null) { |
910 decoder.excessHandles.forEach((h) => h.close()); | 949 decoder.excessHandles.forEach((h) => h.close()); |
911 } | 950 } |
912 return result; | 951 return result; |
913 } | 952 } |
914 | 953 |
915 static _ActivitySetTaskDescriptionParams decode(bindings.Decoder decoder0) { | 954 static _ActivitySetTaskDescriptionParams decode(bindings.Decoder decoder0) { |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 | 1008 |
970 | 1009 |
971 class _ActivitySetSystemUiVisibilityParams extends bindings.Struct { | 1010 class _ActivitySetSystemUiVisibilityParams extends bindings.Struct { |
972 static const List<bindings.StructDataHeader> kVersions = const [ | 1011 static const List<bindings.StructDataHeader> kVersions = const [ |
973 const bindings.StructDataHeader(16, 0) | 1012 const bindings.StructDataHeader(16, 0) |
974 ]; | 1013 ]; |
975 SystemUiVisibility visibility = null; | 1014 SystemUiVisibility visibility = null; |
976 | 1015 |
977 _ActivitySetSystemUiVisibilityParams() : super(kVersions.last.size); | 1016 _ActivitySetSystemUiVisibilityParams() : super(kVersions.last.size); |
978 | 1017 |
| 1018 _ActivitySetSystemUiVisibilityParams.init( |
| 1019 SystemUiVisibility this.visibility |
| 1020 ) : super(kVersions.last.size); |
| 1021 |
979 static _ActivitySetSystemUiVisibilityParams deserialize(bindings.Message messa
ge) { | 1022 static _ActivitySetSystemUiVisibilityParams deserialize(bindings.Message messa
ge) { |
980 var decoder = new bindings.Decoder(message); | 1023 var decoder = new bindings.Decoder(message); |
981 var result = decode(decoder); | 1024 var result = decode(decoder); |
982 if (decoder.excessHandles != null) { | 1025 if (decoder.excessHandles != null) { |
983 decoder.excessHandles.forEach((h) => h.close()); | 1026 decoder.excessHandles.forEach((h) => h.close()); |
984 } | 1027 } |
985 return result; | 1028 return result; |
986 } | 1029 } |
987 | 1030 |
988 static _ActivitySetSystemUiVisibilityParams decode(bindings.Decoder decoder0)
{ | 1031 static _ActivitySetSystemUiVisibilityParams decode(bindings.Decoder decoder0)
{ |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 | 1088 |
1046 | 1089 |
1047 class _ActivitySetRequestedOrientationParams extends bindings.Struct { | 1090 class _ActivitySetRequestedOrientationParams extends bindings.Struct { |
1048 static const List<bindings.StructDataHeader> kVersions = const [ | 1091 static const List<bindings.StructDataHeader> kVersions = const [ |
1049 const bindings.StructDataHeader(16, 0) | 1092 const bindings.StructDataHeader(16, 0) |
1050 ]; | 1093 ]; |
1051 ScreenOrientation orientation = null; | 1094 ScreenOrientation orientation = null; |
1052 | 1095 |
1053 _ActivitySetRequestedOrientationParams() : super(kVersions.last.size); | 1096 _ActivitySetRequestedOrientationParams() : super(kVersions.last.size); |
1054 | 1097 |
| 1098 _ActivitySetRequestedOrientationParams.init( |
| 1099 ScreenOrientation this.orientation |
| 1100 ) : super(kVersions.last.size); |
| 1101 |
1055 static _ActivitySetRequestedOrientationParams deserialize(bindings.Message mes
sage) { | 1102 static _ActivitySetRequestedOrientationParams deserialize(bindings.Message mes
sage) { |
1056 var decoder = new bindings.Decoder(message); | 1103 var decoder = new bindings.Decoder(message); |
1057 var result = decode(decoder); | 1104 var result = decode(decoder); |
1058 if (decoder.excessHandles != null) { | 1105 if (decoder.excessHandles != null) { |
1059 decoder.excessHandles.forEach((h) => h.close()); | 1106 decoder.excessHandles.forEach((h) => h.close()); |
1060 } | 1107 } |
1061 return result; | 1108 return result; |
1062 } | 1109 } |
1063 | 1110 |
1064 static _ActivitySetRequestedOrientationParams decode(bindings.Decoder decoder0
) { | 1111 static _ActivitySetRequestedOrientationParams decode(bindings.Decoder decoder0
) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1120 } | 1167 } |
1121 | 1168 |
1122 | 1169 |
1123 class _PathServiceGetAppDataDirParams extends bindings.Struct { | 1170 class _PathServiceGetAppDataDirParams extends bindings.Struct { |
1124 static const List<bindings.StructDataHeader> kVersions = const [ | 1171 static const List<bindings.StructDataHeader> kVersions = const [ |
1125 const bindings.StructDataHeader(8, 0) | 1172 const bindings.StructDataHeader(8, 0) |
1126 ]; | 1173 ]; |
1127 | 1174 |
1128 _PathServiceGetAppDataDirParams() : super(kVersions.last.size); | 1175 _PathServiceGetAppDataDirParams() : super(kVersions.last.size); |
1129 | 1176 |
| 1177 _PathServiceGetAppDataDirParams.init( |
| 1178 ) : super(kVersions.last.size); |
| 1179 |
1130 static _PathServiceGetAppDataDirParams deserialize(bindings.Message message) { | 1180 static _PathServiceGetAppDataDirParams deserialize(bindings.Message message) { |
1131 var decoder = new bindings.Decoder(message); | 1181 var decoder = new bindings.Decoder(message); |
1132 var result = decode(decoder); | 1182 var result = decode(decoder); |
1133 if (decoder.excessHandles != null) { | 1183 if (decoder.excessHandles != null) { |
1134 decoder.excessHandles.forEach((h) => h.close()); | 1184 decoder.excessHandles.forEach((h) => h.close()); |
1135 } | 1185 } |
1136 return result; | 1186 return result; |
1137 } | 1187 } |
1138 | 1188 |
1139 static _PathServiceGetAppDataDirParams decode(bindings.Decoder decoder0) { | 1189 static _PathServiceGetAppDataDirParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 | 1229 |
1180 | 1230 |
1181 class PathServiceGetAppDataDirResponseParams extends bindings.Struct { | 1231 class PathServiceGetAppDataDirResponseParams extends bindings.Struct { |
1182 static const List<bindings.StructDataHeader> kVersions = const [ | 1232 static const List<bindings.StructDataHeader> kVersions = const [ |
1183 const bindings.StructDataHeader(16, 0) | 1233 const bindings.StructDataHeader(16, 0) |
1184 ]; | 1234 ]; |
1185 String path = null; | 1235 String path = null; |
1186 | 1236 |
1187 PathServiceGetAppDataDirResponseParams() : super(kVersions.last.size); | 1237 PathServiceGetAppDataDirResponseParams() : super(kVersions.last.size); |
1188 | 1238 |
| 1239 PathServiceGetAppDataDirResponseParams.init( |
| 1240 String this.path |
| 1241 ) : super(kVersions.last.size); |
| 1242 |
1189 static PathServiceGetAppDataDirResponseParams deserialize(bindings.Message mes
sage) { | 1243 static PathServiceGetAppDataDirResponseParams deserialize(bindings.Message mes
sage) { |
1190 var decoder = new bindings.Decoder(message); | 1244 var decoder = new bindings.Decoder(message); |
1191 var result = decode(decoder); | 1245 var result = decode(decoder); |
1192 if (decoder.excessHandles != null) { | 1246 if (decoder.excessHandles != null) { |
1193 decoder.excessHandles.forEach((h) => h.close()); | 1247 decoder.excessHandles.forEach((h) => h.close()); |
1194 } | 1248 } |
1195 return result; | 1249 return result; |
1196 } | 1250 } |
1197 | 1251 |
1198 static PathServiceGetAppDataDirResponseParams decode(bindings.Decoder decoder0
) { | 1252 static PathServiceGetAppDataDirResponseParams decode(bindings.Decoder decoder0
) { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 } | 1304 } |
1251 | 1305 |
1252 | 1306 |
1253 class _PathServiceGetFilesDirParams extends bindings.Struct { | 1307 class _PathServiceGetFilesDirParams extends bindings.Struct { |
1254 static const List<bindings.StructDataHeader> kVersions = const [ | 1308 static const List<bindings.StructDataHeader> kVersions = const [ |
1255 const bindings.StructDataHeader(8, 0) | 1309 const bindings.StructDataHeader(8, 0) |
1256 ]; | 1310 ]; |
1257 | 1311 |
1258 _PathServiceGetFilesDirParams() : super(kVersions.last.size); | 1312 _PathServiceGetFilesDirParams() : super(kVersions.last.size); |
1259 | 1313 |
| 1314 _PathServiceGetFilesDirParams.init( |
| 1315 ) : super(kVersions.last.size); |
| 1316 |
1260 static _PathServiceGetFilesDirParams deserialize(bindings.Message message) { | 1317 static _PathServiceGetFilesDirParams deserialize(bindings.Message message) { |
1261 var decoder = new bindings.Decoder(message); | 1318 var decoder = new bindings.Decoder(message); |
1262 var result = decode(decoder); | 1319 var result = decode(decoder); |
1263 if (decoder.excessHandles != null) { | 1320 if (decoder.excessHandles != null) { |
1264 decoder.excessHandles.forEach((h) => h.close()); | 1321 decoder.excessHandles.forEach((h) => h.close()); |
1265 } | 1322 } |
1266 return result; | 1323 return result; |
1267 } | 1324 } |
1268 | 1325 |
1269 static _PathServiceGetFilesDirParams decode(bindings.Decoder decoder0) { | 1326 static _PathServiceGetFilesDirParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 | 1366 |
1310 | 1367 |
1311 class PathServiceGetFilesDirResponseParams extends bindings.Struct { | 1368 class PathServiceGetFilesDirResponseParams extends bindings.Struct { |
1312 static const List<bindings.StructDataHeader> kVersions = const [ | 1369 static const List<bindings.StructDataHeader> kVersions = const [ |
1313 const bindings.StructDataHeader(16, 0) | 1370 const bindings.StructDataHeader(16, 0) |
1314 ]; | 1371 ]; |
1315 String path = null; | 1372 String path = null; |
1316 | 1373 |
1317 PathServiceGetFilesDirResponseParams() : super(kVersions.last.size); | 1374 PathServiceGetFilesDirResponseParams() : super(kVersions.last.size); |
1318 | 1375 |
| 1376 PathServiceGetFilesDirResponseParams.init( |
| 1377 String this.path |
| 1378 ) : super(kVersions.last.size); |
| 1379 |
1319 static PathServiceGetFilesDirResponseParams deserialize(bindings.Message messa
ge) { | 1380 static PathServiceGetFilesDirResponseParams deserialize(bindings.Message messa
ge) { |
1320 var decoder = new bindings.Decoder(message); | 1381 var decoder = new bindings.Decoder(message); |
1321 var result = decode(decoder); | 1382 var result = decode(decoder); |
1322 if (decoder.excessHandles != null) { | 1383 if (decoder.excessHandles != null) { |
1323 decoder.excessHandles.forEach((h) => h.close()); | 1384 decoder.excessHandles.forEach((h) => h.close()); |
1324 } | 1385 } |
1325 return result; | 1386 return result; |
1326 } | 1387 } |
1327 | 1388 |
1328 static PathServiceGetFilesDirResponseParams decode(bindings.Decoder decoder0)
{ | 1389 static PathServiceGetFilesDirResponseParams decode(bindings.Decoder decoder0)
{ |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1380 } | 1441 } |
1381 | 1442 |
1382 | 1443 |
1383 class _PathServiceGetCacheDirParams extends bindings.Struct { | 1444 class _PathServiceGetCacheDirParams extends bindings.Struct { |
1384 static const List<bindings.StructDataHeader> kVersions = const [ | 1445 static const List<bindings.StructDataHeader> kVersions = const [ |
1385 const bindings.StructDataHeader(8, 0) | 1446 const bindings.StructDataHeader(8, 0) |
1386 ]; | 1447 ]; |
1387 | 1448 |
1388 _PathServiceGetCacheDirParams() : super(kVersions.last.size); | 1449 _PathServiceGetCacheDirParams() : super(kVersions.last.size); |
1389 | 1450 |
| 1451 _PathServiceGetCacheDirParams.init( |
| 1452 ) : super(kVersions.last.size); |
| 1453 |
1390 static _PathServiceGetCacheDirParams deserialize(bindings.Message message) { | 1454 static _PathServiceGetCacheDirParams deserialize(bindings.Message message) { |
1391 var decoder = new bindings.Decoder(message); | 1455 var decoder = new bindings.Decoder(message); |
1392 var result = decode(decoder); | 1456 var result = decode(decoder); |
1393 if (decoder.excessHandles != null) { | 1457 if (decoder.excessHandles != null) { |
1394 decoder.excessHandles.forEach((h) => h.close()); | 1458 decoder.excessHandles.forEach((h) => h.close()); |
1395 } | 1459 } |
1396 return result; | 1460 return result; |
1397 } | 1461 } |
1398 | 1462 |
1399 static _PathServiceGetCacheDirParams decode(bindings.Decoder decoder0) { | 1463 static _PathServiceGetCacheDirParams decode(bindings.Decoder decoder0) { |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1439 | 1503 |
1440 | 1504 |
1441 class PathServiceGetCacheDirResponseParams extends bindings.Struct { | 1505 class PathServiceGetCacheDirResponseParams extends bindings.Struct { |
1442 static const List<bindings.StructDataHeader> kVersions = const [ | 1506 static const List<bindings.StructDataHeader> kVersions = const [ |
1443 const bindings.StructDataHeader(16, 0) | 1507 const bindings.StructDataHeader(16, 0) |
1444 ]; | 1508 ]; |
1445 String path = null; | 1509 String path = null; |
1446 | 1510 |
1447 PathServiceGetCacheDirResponseParams() : super(kVersions.last.size); | 1511 PathServiceGetCacheDirResponseParams() : super(kVersions.last.size); |
1448 | 1512 |
| 1513 PathServiceGetCacheDirResponseParams.init( |
| 1514 String this.path |
| 1515 ) : super(kVersions.last.size); |
| 1516 |
1449 static PathServiceGetCacheDirResponseParams deserialize(bindings.Message messa
ge) { | 1517 static PathServiceGetCacheDirResponseParams deserialize(bindings.Message messa
ge) { |
1450 var decoder = new bindings.Decoder(message); | 1518 var decoder = new bindings.Decoder(message); |
1451 var result = decode(decoder); | 1519 var result = decode(decoder); |
1452 if (decoder.excessHandles != null) { | 1520 if (decoder.excessHandles != null) { |
1453 decoder.excessHandles.forEach((h) => h.close()); | 1521 decoder.excessHandles.forEach((h) => h.close()); |
1454 } | 1522 } |
1455 return result; | 1523 return result; |
1456 } | 1524 } |
1457 | 1525 |
1458 static PathServiceGetCacheDirResponseParams decode(bindings.Decoder decoder0)
{ | 1526 static PathServiceGetCacheDirResponseParams decode(bindings.Decoder decoder0)
{ |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1511 | 1579 |
1512 | 1580 |
1513 class _UserFeedbackPerformHapticFeedbackParams extends bindings.Struct { | 1581 class _UserFeedbackPerformHapticFeedbackParams extends bindings.Struct { |
1514 static const List<bindings.StructDataHeader> kVersions = const [ | 1582 static const List<bindings.StructDataHeader> kVersions = const [ |
1515 const bindings.StructDataHeader(16, 0) | 1583 const bindings.StructDataHeader(16, 0) |
1516 ]; | 1584 ]; |
1517 HapticFeedbackType type = null; | 1585 HapticFeedbackType type = null; |
1518 | 1586 |
1519 _UserFeedbackPerformHapticFeedbackParams() : super(kVersions.last.size); | 1587 _UserFeedbackPerformHapticFeedbackParams() : super(kVersions.last.size); |
1520 | 1588 |
| 1589 _UserFeedbackPerformHapticFeedbackParams.init( |
| 1590 HapticFeedbackType this.type |
| 1591 ) : super(kVersions.last.size); |
| 1592 |
1521 static _UserFeedbackPerformHapticFeedbackParams deserialize(bindings.Message m
essage) { | 1593 static _UserFeedbackPerformHapticFeedbackParams deserialize(bindings.Message m
essage) { |
1522 var decoder = new bindings.Decoder(message); | 1594 var decoder = new bindings.Decoder(message); |
1523 var result = decode(decoder); | 1595 var result = decode(decoder); |
1524 if (decoder.excessHandles != null) { | 1596 if (decoder.excessHandles != null) { |
1525 decoder.excessHandles.forEach((h) => h.close()); | 1597 decoder.excessHandles.forEach((h) => h.close()); |
1526 } | 1598 } |
1527 return result; | 1599 return result; |
1528 } | 1600 } |
1529 | 1601 |
1530 static _UserFeedbackPerformHapticFeedbackParams decode(bindings.Decoder decode
r0) { | 1602 static _UserFeedbackPerformHapticFeedbackParams decode(bindings.Decoder decode
r0) { |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 | 1659 |
1588 | 1660 |
1589 class _UserFeedbackPerformAuralFeedbackParams extends bindings.Struct { | 1661 class _UserFeedbackPerformAuralFeedbackParams extends bindings.Struct { |
1590 static const List<bindings.StructDataHeader> kVersions = const [ | 1662 static const List<bindings.StructDataHeader> kVersions = const [ |
1591 const bindings.StructDataHeader(16, 0) | 1663 const bindings.StructDataHeader(16, 0) |
1592 ]; | 1664 ]; |
1593 AuralFeedbackType type = null; | 1665 AuralFeedbackType type = null; |
1594 | 1666 |
1595 _UserFeedbackPerformAuralFeedbackParams() : super(kVersions.last.size); | 1667 _UserFeedbackPerformAuralFeedbackParams() : super(kVersions.last.size); |
1596 | 1668 |
| 1669 _UserFeedbackPerformAuralFeedbackParams.init( |
| 1670 AuralFeedbackType this.type |
| 1671 ) : super(kVersions.last.size); |
| 1672 |
1597 static _UserFeedbackPerformAuralFeedbackParams deserialize(bindings.Message me
ssage) { | 1673 static _UserFeedbackPerformAuralFeedbackParams deserialize(bindings.Message me
ssage) { |
1598 var decoder = new bindings.Decoder(message); | 1674 var decoder = new bindings.Decoder(message); |
1599 var result = decode(decoder); | 1675 var result = decode(decoder); |
1600 if (decoder.excessHandles != null) { | 1676 if (decoder.excessHandles != null) { |
1601 decoder.excessHandles.forEach((h) => h.close()); | 1677 decoder.excessHandles.forEach((h) => h.close()); |
1602 } | 1678 } |
1603 return result; | 1679 return result; |
1604 } | 1680 } |
1605 | 1681 |
1606 static _UserFeedbackPerformAuralFeedbackParams decode(bindings.Decoder decoder
0) { | 1682 static _UserFeedbackPerformAuralFeedbackParams decode(bindings.Decoder decoder
0) { |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1662 } | 1738 } |
1663 | 1739 |
1664 const int _activityMethodGetUserFeedbackName = 0; | 1740 const int _activityMethodGetUserFeedbackName = 0; |
1665 const int _activityMethodStartActivityName = 1; | 1741 const int _activityMethodStartActivityName = 1; |
1666 const int _activityMethodFinishCurrentActivityName = 2; | 1742 const int _activityMethodFinishCurrentActivityName = 2; |
1667 const int _activityMethodSetTaskDescriptionName = 3; | 1743 const int _activityMethodSetTaskDescriptionName = 3; |
1668 const int _activityMethodSetSystemUiVisibilityName = 4; | 1744 const int _activityMethodSetSystemUiVisibilityName = 4; |
1669 const int _activityMethodSetRequestedOrientationName = 5; | 1745 const int _activityMethodSetRequestedOrientationName = 5; |
1670 | 1746 |
1671 class _ActivityServiceDescription implements service_describer.ServiceDescriptio
n { | 1747 class _ActivityServiceDescription implements service_describer.ServiceDescriptio
n { |
1672 dynamic getTopLevelInterface([Function responseFactory]) => | 1748 void getTopLevelInterface(Function responder) { |
1673 responseFactory(null); | 1749 responder(null); |
| 1750 } |
1674 | 1751 |
1675 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1752 void getTypeDefinition(String typeKey, Function responder) { |
1676 responseFactory(null); | 1753 responder(null); |
| 1754 } |
1677 | 1755 |
1678 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1756 void getAllTypeDefinitions(Function responder) { |
1679 responseFactory(null); | 1757 responder(null); |
| 1758 } |
1680 } | 1759 } |
1681 | 1760 |
1682 abstract class Activity { | 1761 abstract class Activity { |
1683 static const String serviceName = "activity::Activity"; | 1762 static const String serviceName = "activity::Activity"; |
1684 | 1763 |
1685 static service_describer.ServiceDescription _cachedServiceDescription; | 1764 static service_describer.ServiceDescription _cachedServiceDescription; |
1686 static service_describer.ServiceDescription get serviceDescription { | 1765 static service_describer.ServiceDescription get serviceDescription { |
1687 if (_cachedServiceDescription == null) { | 1766 if (_cachedServiceDescription == null) { |
1688 _cachedServiceDescription = new _ActivityServiceDescription(); | 1767 _cachedServiceDescription = new _ActivityServiceDescription(); |
1689 } | 1768 } |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 : super.fromHandle(handle, autoBegin: impl != null) { | 1939 : super.fromHandle(handle, autoBegin: impl != null) { |
1861 _impl = impl; | 1940 _impl = impl; |
1862 } | 1941 } |
1863 | 1942 |
1864 _ActivityStubControl.unbound([this._impl]) : super.unbound(); | 1943 _ActivityStubControl.unbound([this._impl]) : super.unbound(); |
1865 | 1944 |
1866 String get serviceName => Activity.serviceName; | 1945 String get serviceName => Activity.serviceName; |
1867 | 1946 |
1868 | 1947 |
1869 | 1948 |
1870 dynamic handleMessage(bindings.ServiceMessage message) { | 1949 void handleMessage(bindings.ServiceMessage message) { |
1871 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 1950 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
1872 return bindings.ControlMessageHandler.handleMessage(this, | 1951 bindings.ControlMessageHandler.handleMessage( |
1873 0, | 1952 this, 0, message); |
1874 message); | 1953 return; |
1875 } | 1954 } |
1876 if (_impl == null) { | 1955 if (_impl == null) { |
1877 throw new core.MojoApiError("$this has no implementation set"); | 1956 throw new core.MojoApiError("$this has no implementation set"); |
1878 } | 1957 } |
1879 switch (message.header.type) { | 1958 switch (message.header.type) { |
1880 case _activityMethodGetUserFeedbackName: | 1959 case _activityMethodGetUserFeedbackName: |
1881 var params = _ActivityGetUserFeedbackParams.deserialize( | 1960 var params = _ActivityGetUserFeedbackParams.deserialize( |
1882 message.payload); | 1961 message.payload); |
1883 _impl.getUserFeedback(params.userFeedback); | 1962 _impl.getUserFeedback(params.userFeedback); |
1884 break; | 1963 break; |
(...skipping 17 matching lines...) Expand all Loading... |
1902 break; | 1981 break; |
1903 case _activityMethodSetRequestedOrientationName: | 1982 case _activityMethodSetRequestedOrientationName: |
1904 var params = _ActivitySetRequestedOrientationParams.deserialize( | 1983 var params = _ActivitySetRequestedOrientationParams.deserialize( |
1905 message.payload); | 1984 message.payload); |
1906 _impl.setRequestedOrientation(params.orientation); | 1985 _impl.setRequestedOrientation(params.orientation); |
1907 break; | 1986 break; |
1908 default: | 1987 default: |
1909 throw new bindings.MojoCodecError("Unexpected message name"); | 1988 throw new bindings.MojoCodecError("Unexpected message name"); |
1910 break; | 1989 break; |
1911 } | 1990 } |
1912 return null; | |
1913 } | 1991 } |
1914 | 1992 |
1915 Activity get impl => _impl; | 1993 Activity get impl => _impl; |
1916 set impl(Activity d) { | 1994 set impl(Activity d) { |
1917 if (d == null) { | 1995 if (d == null) { |
1918 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 1996 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
1919 } | 1997 } |
1920 if (isBound && (_impl == null)) { | 1998 if (isBound && (_impl == null)) { |
1921 beginHandlingEvents(); | 1999 beginHandlingEvents(); |
1922 } | 2000 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1981 void setRequestedOrientation(ScreenOrientation orientation) { | 2059 void setRequestedOrientation(ScreenOrientation orientation) { |
1982 return impl.setRequestedOrientation(orientation); | 2060 return impl.setRequestedOrientation(orientation); |
1983 } | 2061 } |
1984 } | 2062 } |
1985 | 2063 |
1986 const int _pathServiceMethodGetAppDataDirName = 0; | 2064 const int _pathServiceMethodGetAppDataDirName = 0; |
1987 const int _pathServiceMethodGetFilesDirName = 1; | 2065 const int _pathServiceMethodGetFilesDirName = 1; |
1988 const int _pathServiceMethodGetCacheDirName = 2; | 2066 const int _pathServiceMethodGetCacheDirName = 2; |
1989 | 2067 |
1990 class _PathServiceServiceDescription implements service_describer.ServiceDescrip
tion { | 2068 class _PathServiceServiceDescription implements service_describer.ServiceDescrip
tion { |
1991 dynamic getTopLevelInterface([Function responseFactory]) => | 2069 void getTopLevelInterface(Function responder) { |
1992 responseFactory(null); | 2070 responder(null); |
| 2071 } |
1993 | 2072 |
1994 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2073 void getTypeDefinition(String typeKey, Function responder) { |
1995 responseFactory(null); | 2074 responder(null); |
| 2075 } |
1996 | 2076 |
1997 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2077 void getAllTypeDefinitions(Function responder) { |
1998 responseFactory(null); | 2078 responder(null); |
| 2079 } |
1999 } | 2080 } |
2000 | 2081 |
2001 abstract class PathService { | 2082 abstract class PathService { |
2002 static const String serviceName = "activity::PathService"; | 2083 static const String serviceName = "activity::PathService"; |
2003 | 2084 |
2004 static service_describer.ServiceDescription _cachedServiceDescription; | 2085 static service_describer.ServiceDescription _cachedServiceDescription; |
2005 static service_describer.ServiceDescription get serviceDescription { | 2086 static service_describer.ServiceDescription get serviceDescription { |
2006 if (_cachedServiceDescription == null) { | 2087 if (_cachedServiceDescription == null) { |
2007 _cachedServiceDescription = new _PathServiceServiceDescription(); | 2088 _cachedServiceDescription = new _PathServiceServiceDescription(); |
2008 } | 2089 } |
2009 return _cachedServiceDescription; | 2090 return _cachedServiceDescription; |
2010 } | 2091 } |
2011 | 2092 |
2012 static PathServiceProxy connectToService( | 2093 static PathServiceProxy connectToService( |
2013 bindings.ServiceConnector s, String url, [String serviceName]) { | 2094 bindings.ServiceConnector s, String url, [String serviceName]) { |
2014 PathServiceProxy p = new PathServiceProxy.unbound(); | 2095 PathServiceProxy p = new PathServiceProxy.unbound(); |
2015 String name = serviceName ?? PathService.serviceName; | 2096 String name = serviceName ?? PathService.serviceName; |
2016 if ((name == null) || name.isEmpty) { | 2097 if ((name == null) || name.isEmpty) { |
2017 throw new core.MojoApiError( | 2098 throw new core.MojoApiError( |
2018 "If an interface has no ServiceName, then one must be provided."); | 2099 "If an interface has no ServiceName, then one must be provided."); |
2019 } | 2100 } |
2020 s.connectToService(url, p, name); | 2101 s.connectToService(url, p, name); |
2021 return p; | 2102 return p; |
2022 } | 2103 } |
2023 dynamic getAppDataDir([Function responseFactory = null]); | 2104 void getAppDataDir(void callback(String path)); |
2024 dynamic getFilesDir([Function responseFactory = null]); | 2105 void getFilesDir(void callback(String path)); |
2025 dynamic getCacheDir([Function responseFactory = null]); | 2106 void getCacheDir(void callback(String path)); |
2026 } | 2107 } |
2027 | 2108 |
2028 abstract class PathServiceInterface | 2109 abstract class PathServiceInterface |
2029 implements bindings.MojoInterface<PathService>, | 2110 implements bindings.MojoInterface<PathService>, |
2030 PathService { | 2111 PathService { |
2031 factory PathServiceInterface([PathService impl]) => | 2112 factory PathServiceInterface([PathService impl]) => |
2032 new PathServiceStub.unbound(impl); | 2113 new PathServiceStub.unbound(impl); |
2033 factory PathServiceInterface.fromEndpoint( | 2114 factory PathServiceInterface.fromEndpoint( |
2034 core.MojoMessagePipeEndpoint endpoint, | 2115 core.MojoMessagePipeEndpoint endpoint, |
2035 [PathService impl]) => | 2116 [PathService impl]) => |
(...skipping 22 matching lines...) Expand all Loading... |
2058 | 2139 |
2059 void handleResponse(bindings.ServiceMessage message) { | 2140 void handleResponse(bindings.ServiceMessage message) { |
2060 switch (message.header.type) { | 2141 switch (message.header.type) { |
2061 case _pathServiceMethodGetAppDataDirName: | 2142 case _pathServiceMethodGetAppDataDirName: |
2062 var r = PathServiceGetAppDataDirResponseParams.deserialize( | 2143 var r = PathServiceGetAppDataDirResponseParams.deserialize( |
2063 message.payload); | 2144 message.payload); |
2064 if (!message.header.hasRequestId) { | 2145 if (!message.header.hasRequestId) { |
2065 proxyError("Expected a message with a valid request Id."); | 2146 proxyError("Expected a message with a valid request Id."); |
2066 return; | 2147 return; |
2067 } | 2148 } |
2068 Completer c = completerMap[message.header.requestId]; | 2149 Function callback = callbackMap[message.header.requestId]; |
2069 if (c == null) { | 2150 if (callback == null) { |
2070 proxyError( | 2151 proxyError( |
2071 "Message had unknown request Id: ${message.header.requestId}"); | 2152 "Message had unknown request Id: ${message.header.requestId}"); |
2072 return; | 2153 return; |
2073 } | 2154 } |
2074 completerMap.remove(message.header.requestId); | 2155 callbackMap.remove(message.header.requestId); |
2075 if (c.isCompleted) { | 2156 callback(r.path ); |
2076 proxyError("Response completer already completed"); | |
2077 return; | |
2078 } | |
2079 c.complete(r); | |
2080 break; | 2157 break; |
2081 case _pathServiceMethodGetFilesDirName: | 2158 case _pathServiceMethodGetFilesDirName: |
2082 var r = PathServiceGetFilesDirResponseParams.deserialize( | 2159 var r = PathServiceGetFilesDirResponseParams.deserialize( |
2083 message.payload); | 2160 message.payload); |
2084 if (!message.header.hasRequestId) { | 2161 if (!message.header.hasRequestId) { |
2085 proxyError("Expected a message with a valid request Id."); | 2162 proxyError("Expected a message with a valid request Id."); |
2086 return; | 2163 return; |
2087 } | 2164 } |
2088 Completer c = completerMap[message.header.requestId]; | 2165 Function callback = callbackMap[message.header.requestId]; |
2089 if (c == null) { | 2166 if (callback == null) { |
2090 proxyError( | 2167 proxyError( |
2091 "Message had unknown request Id: ${message.header.requestId}"); | 2168 "Message had unknown request Id: ${message.header.requestId}"); |
2092 return; | 2169 return; |
2093 } | 2170 } |
2094 completerMap.remove(message.header.requestId); | 2171 callbackMap.remove(message.header.requestId); |
2095 if (c.isCompleted) { | 2172 callback(r.path ); |
2096 proxyError("Response completer already completed"); | |
2097 return; | |
2098 } | |
2099 c.complete(r); | |
2100 break; | 2173 break; |
2101 case _pathServiceMethodGetCacheDirName: | 2174 case _pathServiceMethodGetCacheDirName: |
2102 var r = PathServiceGetCacheDirResponseParams.deserialize( | 2175 var r = PathServiceGetCacheDirResponseParams.deserialize( |
2103 message.payload); | 2176 message.payload); |
2104 if (!message.header.hasRequestId) { | 2177 if (!message.header.hasRequestId) { |
2105 proxyError("Expected a message with a valid request Id."); | 2178 proxyError("Expected a message with a valid request Id."); |
2106 return; | 2179 return; |
2107 } | 2180 } |
2108 Completer c = completerMap[message.header.requestId]; | 2181 Function callback = callbackMap[message.header.requestId]; |
2109 if (c == null) { | 2182 if (callback == null) { |
2110 proxyError( | 2183 proxyError( |
2111 "Message had unknown request Id: ${message.header.requestId}"); | 2184 "Message had unknown request Id: ${message.header.requestId}"); |
2112 return; | 2185 return; |
2113 } | 2186 } |
2114 completerMap.remove(message.header.requestId); | 2187 callbackMap.remove(message.header.requestId); |
2115 if (c.isCompleted) { | 2188 callback(r.path ); |
2116 proxyError("Response completer already completed"); | |
2117 return; | |
2118 } | |
2119 c.complete(r); | |
2120 break; | 2189 break; |
2121 default: | 2190 default: |
2122 proxyError("Unexpected message type: ${message.header.type}"); | 2191 proxyError("Unexpected message type: ${message.header.type}"); |
2123 close(immediate: true); | 2192 close(immediate: true); |
2124 break; | 2193 break; |
2125 } | 2194 } |
2126 } | 2195 } |
2127 | 2196 |
2128 PathService get impl => null; | 2197 PathService get impl => null; |
2129 set impl(PathService _) { | 2198 set impl(PathService _) { |
(...skipping 22 matching lines...) Expand all Loading... |
2152 PathServiceProxy.unbound() | 2221 PathServiceProxy.unbound() |
2153 : super(new _PathServiceProxyControl.unbound()); | 2222 : super(new _PathServiceProxyControl.unbound()); |
2154 | 2223 |
2155 static PathServiceProxy newFromEndpoint( | 2224 static PathServiceProxy newFromEndpoint( |
2156 core.MojoMessagePipeEndpoint endpoint) { | 2225 core.MojoMessagePipeEndpoint endpoint) { |
2157 assert(endpoint.setDescription("For PathServiceProxy")); | 2226 assert(endpoint.setDescription("For PathServiceProxy")); |
2158 return new PathServiceProxy.fromEndpoint(endpoint); | 2227 return new PathServiceProxy.fromEndpoint(endpoint); |
2159 } | 2228 } |
2160 | 2229 |
2161 | 2230 |
2162 dynamic getAppDataDir([Function responseFactory = null]) { | 2231 void getAppDataDir(void callback(String path)) { |
2163 var params = new _PathServiceGetAppDataDirParams(); | 2232 var params = new _PathServiceGetAppDataDirParams(); |
2164 return ctrl.sendMessageWithRequestId( | 2233 ctrl.sendMessageWithRequestId( |
2165 params, | 2234 params, |
2166 _pathServiceMethodGetAppDataDirName, | 2235 _pathServiceMethodGetAppDataDirName, |
2167 -1, | 2236 -1, |
2168 bindings.MessageHeader.kMessageExpectsResponse); | 2237 bindings.MessageHeader.kMessageExpectsResponse, |
| 2238 callback); |
2169 } | 2239 } |
2170 dynamic getFilesDir([Function responseFactory = null]) { | 2240 void getFilesDir(void callback(String path)) { |
2171 var params = new _PathServiceGetFilesDirParams(); | 2241 var params = new _PathServiceGetFilesDirParams(); |
2172 return ctrl.sendMessageWithRequestId( | 2242 ctrl.sendMessageWithRequestId( |
2173 params, | 2243 params, |
2174 _pathServiceMethodGetFilesDirName, | 2244 _pathServiceMethodGetFilesDirName, |
2175 -1, | 2245 -1, |
2176 bindings.MessageHeader.kMessageExpectsResponse); | 2246 bindings.MessageHeader.kMessageExpectsResponse, |
| 2247 callback); |
2177 } | 2248 } |
2178 dynamic getCacheDir([Function responseFactory = null]) { | 2249 void getCacheDir(void callback(String path)) { |
2179 var params = new _PathServiceGetCacheDirParams(); | 2250 var params = new _PathServiceGetCacheDirParams(); |
2180 return ctrl.sendMessageWithRequestId( | 2251 ctrl.sendMessageWithRequestId( |
2181 params, | 2252 params, |
2182 _pathServiceMethodGetCacheDirName, | 2253 _pathServiceMethodGetCacheDirName, |
2183 -1, | 2254 -1, |
2184 bindings.MessageHeader.kMessageExpectsResponse); | 2255 bindings.MessageHeader.kMessageExpectsResponse, |
| 2256 callback); |
2185 } | 2257 } |
2186 } | 2258 } |
2187 | 2259 |
2188 class _PathServiceStubControl | 2260 class _PathServiceStubControl |
2189 extends bindings.StubMessageHandler | 2261 extends bindings.StubMessageHandler |
2190 implements bindings.StubControl<PathService> { | 2262 implements bindings.StubControl<PathService> { |
2191 PathService _impl; | 2263 PathService _impl; |
2192 | 2264 |
2193 _PathServiceStubControl.fromEndpoint( | 2265 _PathServiceStubControl.fromEndpoint( |
2194 core.MojoMessagePipeEndpoint endpoint, [PathService impl]) | 2266 core.MojoMessagePipeEndpoint endpoint, [PathService impl]) |
2195 : super.fromEndpoint(endpoint, autoBegin: impl != null) { | 2267 : super.fromEndpoint(endpoint, autoBegin: impl != null) { |
2196 _impl = impl; | 2268 _impl = impl; |
2197 } | 2269 } |
2198 | 2270 |
2199 _PathServiceStubControl.fromHandle( | 2271 _PathServiceStubControl.fromHandle( |
2200 core.MojoHandle handle, [PathService impl]) | 2272 core.MojoHandle handle, [PathService impl]) |
2201 : super.fromHandle(handle, autoBegin: impl != null) { | 2273 : super.fromHandle(handle, autoBegin: impl != null) { |
2202 _impl = impl; | 2274 _impl = impl; |
2203 } | 2275 } |
2204 | 2276 |
2205 _PathServiceStubControl.unbound([this._impl]) : super.unbound(); | 2277 _PathServiceStubControl.unbound([this._impl]) : super.unbound(); |
2206 | 2278 |
2207 String get serviceName => PathService.serviceName; | 2279 String get serviceName => PathService.serviceName; |
2208 | 2280 |
2209 | 2281 |
2210 PathServiceGetAppDataDirResponseParams _pathServiceGetAppDataDirResponseParams
Factory(String path) { | 2282 Function _pathServiceGetAppDataDirResponseParamsResponder( |
2211 var result = new PathServiceGetAppDataDirResponseParams(); | 2283 int requestId) { |
2212 result.path = path; | 2284 return (String path) { |
2213 return result; | 2285 var result = new PathServiceGetAppDataDirResponseParams(); |
| 2286 result.path = path; |
| 2287 sendResponse(buildResponseWithId( |
| 2288 result, |
| 2289 _pathServiceMethodGetAppDataDirName, |
| 2290 requestId, |
| 2291 bindings.MessageHeader.kMessageIsResponse)); |
| 2292 }; |
2214 } | 2293 } |
2215 PathServiceGetFilesDirResponseParams _pathServiceGetFilesDirResponseParamsFact
ory(String path) { | 2294 Function _pathServiceGetFilesDirResponseParamsResponder( |
2216 var result = new PathServiceGetFilesDirResponseParams(); | 2295 int requestId) { |
2217 result.path = path; | 2296 return (String path) { |
2218 return result; | 2297 var result = new PathServiceGetFilesDirResponseParams(); |
| 2298 result.path = path; |
| 2299 sendResponse(buildResponseWithId( |
| 2300 result, |
| 2301 _pathServiceMethodGetFilesDirName, |
| 2302 requestId, |
| 2303 bindings.MessageHeader.kMessageIsResponse)); |
| 2304 }; |
2219 } | 2305 } |
2220 PathServiceGetCacheDirResponseParams _pathServiceGetCacheDirResponseParamsFact
ory(String path) { | 2306 Function _pathServiceGetCacheDirResponseParamsResponder( |
2221 var result = new PathServiceGetCacheDirResponseParams(); | 2307 int requestId) { |
2222 result.path = path; | 2308 return (String path) { |
2223 return result; | 2309 var result = new PathServiceGetCacheDirResponseParams(); |
| 2310 result.path = path; |
| 2311 sendResponse(buildResponseWithId( |
| 2312 result, |
| 2313 _pathServiceMethodGetCacheDirName, |
| 2314 requestId, |
| 2315 bindings.MessageHeader.kMessageIsResponse)); |
| 2316 }; |
2224 } | 2317 } |
2225 | 2318 |
2226 dynamic handleMessage(bindings.ServiceMessage message) { | 2319 void handleMessage(bindings.ServiceMessage message) { |
2227 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2320 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
2228 return bindings.ControlMessageHandler.handleMessage(this, | 2321 bindings.ControlMessageHandler.handleMessage( |
2229 0, | 2322 this, 0, message); |
2230 message); | 2323 return; |
2231 } | 2324 } |
2232 if (_impl == null) { | 2325 if (_impl == null) { |
2233 throw new core.MojoApiError("$this has no implementation set"); | 2326 throw new core.MojoApiError("$this has no implementation set"); |
2234 } | 2327 } |
2235 switch (message.header.type) { | 2328 switch (message.header.type) { |
2236 case _pathServiceMethodGetAppDataDirName: | 2329 case _pathServiceMethodGetAppDataDirName: |
2237 var response = _impl.getAppDataDir(_pathServiceGetAppDataDirResponsePara
msFactory); | 2330 _impl.getAppDataDir(_pathServiceGetAppDataDirResponseParamsResponder(mes
sage.header.requestId)); |
2238 if (response is Future) { | |
2239 return response.then((response) { | |
2240 if (response != null) { | |
2241 return buildResponseWithId( | |
2242 response, | |
2243 _pathServiceMethodGetAppDataDirName, | |
2244 message.header.requestId, | |
2245 bindings.MessageHeader.kMessageIsResponse); | |
2246 } | |
2247 }); | |
2248 } else if (response != null) { | |
2249 return buildResponseWithId( | |
2250 response, | |
2251 _pathServiceMethodGetAppDataDirName, | |
2252 message.header.requestId, | |
2253 bindings.MessageHeader.kMessageIsResponse); | |
2254 } | |
2255 break; | 2331 break; |
2256 case _pathServiceMethodGetFilesDirName: | 2332 case _pathServiceMethodGetFilesDirName: |
2257 var response = _impl.getFilesDir(_pathServiceGetFilesDirResponseParamsFa
ctory); | 2333 _impl.getFilesDir(_pathServiceGetFilesDirResponseParamsResponder(message
.header.requestId)); |
2258 if (response is Future) { | |
2259 return response.then((response) { | |
2260 if (response != null) { | |
2261 return buildResponseWithId( | |
2262 response, | |
2263 _pathServiceMethodGetFilesDirName, | |
2264 message.header.requestId, | |
2265 bindings.MessageHeader.kMessageIsResponse); | |
2266 } | |
2267 }); | |
2268 } else if (response != null) { | |
2269 return buildResponseWithId( | |
2270 response, | |
2271 _pathServiceMethodGetFilesDirName, | |
2272 message.header.requestId, | |
2273 bindings.MessageHeader.kMessageIsResponse); | |
2274 } | |
2275 break; | 2334 break; |
2276 case _pathServiceMethodGetCacheDirName: | 2335 case _pathServiceMethodGetCacheDirName: |
2277 var response = _impl.getCacheDir(_pathServiceGetCacheDirResponseParamsFa
ctory); | 2336 _impl.getCacheDir(_pathServiceGetCacheDirResponseParamsResponder(message
.header.requestId)); |
2278 if (response is Future) { | |
2279 return response.then((response) { | |
2280 if (response != null) { | |
2281 return buildResponseWithId( | |
2282 response, | |
2283 _pathServiceMethodGetCacheDirName, | |
2284 message.header.requestId, | |
2285 bindings.MessageHeader.kMessageIsResponse); | |
2286 } | |
2287 }); | |
2288 } else if (response != null) { | |
2289 return buildResponseWithId( | |
2290 response, | |
2291 _pathServiceMethodGetCacheDirName, | |
2292 message.header.requestId, | |
2293 bindings.MessageHeader.kMessageIsResponse); | |
2294 } | |
2295 break; | 2337 break; |
2296 default: | 2338 default: |
2297 throw new bindings.MojoCodecError("Unexpected message name"); | 2339 throw new bindings.MojoCodecError("Unexpected message name"); |
2298 break; | 2340 break; |
2299 } | 2341 } |
2300 return null; | |
2301 } | 2342 } |
2302 | 2343 |
2303 PathService get impl => _impl; | 2344 PathService get impl => _impl; |
2304 set impl(PathService d) { | 2345 set impl(PathService d) { |
2305 if (d == null) { | 2346 if (d == null) { |
2306 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2347 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
2307 } | 2348 } |
2308 if (isBound && (_impl == null)) { | 2349 if (isBound && (_impl == null)) { |
2309 beginHandlingEvents(); | 2350 beginHandlingEvents(); |
2310 } | 2351 } |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2344 core.MojoHandle handle, [PathService impl]) | 2385 core.MojoHandle handle, [PathService impl]) |
2345 : super(new _PathServiceStubControl.fromHandle(handle, impl)); | 2386 : super(new _PathServiceStubControl.fromHandle(handle, impl)); |
2346 | 2387 |
2347 static PathServiceStub newFromEndpoint( | 2388 static PathServiceStub newFromEndpoint( |
2348 core.MojoMessagePipeEndpoint endpoint) { | 2389 core.MojoMessagePipeEndpoint endpoint) { |
2349 assert(endpoint.setDescription("For PathServiceStub")); | 2390 assert(endpoint.setDescription("For PathServiceStub")); |
2350 return new PathServiceStub.fromEndpoint(endpoint); | 2391 return new PathServiceStub.fromEndpoint(endpoint); |
2351 } | 2392 } |
2352 | 2393 |
2353 | 2394 |
2354 dynamic getAppDataDir([Function responseFactory = null]) { | 2395 void getAppDataDir(void callback(String path)) { |
2355 return impl.getAppDataDir(responseFactory); | 2396 return impl.getAppDataDir(callback); |
2356 } | 2397 } |
2357 dynamic getFilesDir([Function responseFactory = null]) { | 2398 void getFilesDir(void callback(String path)) { |
2358 return impl.getFilesDir(responseFactory); | 2399 return impl.getFilesDir(callback); |
2359 } | 2400 } |
2360 dynamic getCacheDir([Function responseFactory = null]) { | 2401 void getCacheDir(void callback(String path)) { |
2361 return impl.getCacheDir(responseFactory); | 2402 return impl.getCacheDir(callback); |
2362 } | 2403 } |
2363 } | 2404 } |
2364 | 2405 |
2365 const int _userFeedbackMethodPerformHapticFeedbackName = 0; | 2406 const int _userFeedbackMethodPerformHapticFeedbackName = 0; |
2366 const int _userFeedbackMethodPerformAuralFeedbackName = 1; | 2407 const int _userFeedbackMethodPerformAuralFeedbackName = 1; |
2367 | 2408 |
2368 class _UserFeedbackServiceDescription implements service_describer.ServiceDescri
ption { | 2409 class _UserFeedbackServiceDescription implements service_describer.ServiceDescri
ption { |
2369 dynamic getTopLevelInterface([Function responseFactory]) => | 2410 void getTopLevelInterface(Function responder) { |
2370 responseFactory(null); | 2411 responder(null); |
| 2412 } |
2371 | 2413 |
2372 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 2414 void getTypeDefinition(String typeKey, Function responder) { |
2373 responseFactory(null); | 2415 responder(null); |
| 2416 } |
2374 | 2417 |
2375 dynamic getAllTypeDefinitions([Function responseFactory]) => | 2418 void getAllTypeDefinitions(Function responder) { |
2376 responseFactory(null); | 2419 responder(null); |
| 2420 } |
2377 } | 2421 } |
2378 | 2422 |
2379 abstract class UserFeedback { | 2423 abstract class UserFeedback { |
2380 static const String serviceName = null; | 2424 static const String serviceName = null; |
2381 | 2425 |
2382 static service_describer.ServiceDescription _cachedServiceDescription; | 2426 static service_describer.ServiceDescription _cachedServiceDescription; |
2383 static service_describer.ServiceDescription get serviceDescription { | 2427 static service_describer.ServiceDescription get serviceDescription { |
2384 if (_cachedServiceDescription == null) { | 2428 if (_cachedServiceDescription == null) { |
2385 _cachedServiceDescription = new _UserFeedbackServiceDescription(); | 2429 _cachedServiceDescription = new _UserFeedbackServiceDescription(); |
2386 } | 2430 } |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2514 : super.fromHandle(handle, autoBegin: impl != null) { | 2558 : super.fromHandle(handle, autoBegin: impl != null) { |
2515 _impl = impl; | 2559 _impl = impl; |
2516 } | 2560 } |
2517 | 2561 |
2518 _UserFeedbackStubControl.unbound([this._impl]) : super.unbound(); | 2562 _UserFeedbackStubControl.unbound([this._impl]) : super.unbound(); |
2519 | 2563 |
2520 String get serviceName => UserFeedback.serviceName; | 2564 String get serviceName => UserFeedback.serviceName; |
2521 | 2565 |
2522 | 2566 |
2523 | 2567 |
2524 dynamic handleMessage(bindings.ServiceMessage message) { | 2568 void handleMessage(bindings.ServiceMessage message) { |
2525 if (bindings.ControlMessageHandler.isControlMessage(message)) { | 2569 if (bindings.ControlMessageHandler.isControlMessage(message)) { |
2526 return bindings.ControlMessageHandler.handleMessage(this, | 2570 bindings.ControlMessageHandler.handleMessage( |
2527 0, | 2571 this, 0, message); |
2528 message); | 2572 return; |
2529 } | 2573 } |
2530 if (_impl == null) { | 2574 if (_impl == null) { |
2531 throw new core.MojoApiError("$this has no implementation set"); | 2575 throw new core.MojoApiError("$this has no implementation set"); |
2532 } | 2576 } |
2533 switch (message.header.type) { | 2577 switch (message.header.type) { |
2534 case _userFeedbackMethodPerformHapticFeedbackName: | 2578 case _userFeedbackMethodPerformHapticFeedbackName: |
2535 var params = _UserFeedbackPerformHapticFeedbackParams.deserialize( | 2579 var params = _UserFeedbackPerformHapticFeedbackParams.deserialize( |
2536 message.payload); | 2580 message.payload); |
2537 _impl.performHapticFeedback(params.type); | 2581 _impl.performHapticFeedback(params.type); |
2538 break; | 2582 break; |
2539 case _userFeedbackMethodPerformAuralFeedbackName: | 2583 case _userFeedbackMethodPerformAuralFeedbackName: |
2540 var params = _UserFeedbackPerformAuralFeedbackParams.deserialize( | 2584 var params = _UserFeedbackPerformAuralFeedbackParams.deserialize( |
2541 message.payload); | 2585 message.payload); |
2542 _impl.performAuralFeedback(params.type); | 2586 _impl.performAuralFeedback(params.type); |
2543 break; | 2587 break; |
2544 default: | 2588 default: |
2545 throw new bindings.MojoCodecError("Unexpected message name"); | 2589 throw new bindings.MojoCodecError("Unexpected message name"); |
2546 break; | 2590 break; |
2547 } | 2591 } |
2548 return null; | |
2549 } | 2592 } |
2550 | 2593 |
2551 UserFeedback get impl => _impl; | 2594 UserFeedback get impl => _impl; |
2552 set impl(UserFeedback d) { | 2595 set impl(UserFeedback d) { |
2553 if (d == null) { | 2596 if (d == null) { |
2554 throw new core.MojoApiError("$this: Cannot set a null implementation"); | 2597 throw new core.MojoApiError("$this: Cannot set a null implementation"); |
2555 } | 2598 } |
2556 if (isBound && (_impl == null)) { | 2599 if (isBound && (_impl == null)) { |
2557 beginHandlingEvents(); | 2600 beginHandlingEvents(); |
2558 } | 2601 } |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2602 void performHapticFeedback(HapticFeedbackType type) { | 2645 void performHapticFeedback(HapticFeedbackType type) { |
2603 return impl.performHapticFeedback(type); | 2646 return impl.performHapticFeedback(type); |
2604 } | 2647 } |
2605 void performAuralFeedback(AuralFeedbackType type) { | 2648 void performAuralFeedback(AuralFeedbackType type) { |
2606 return impl.performAuralFeedback(type); | 2649 return impl.performAuralFeedback(type); |
2607 } | 2650 } |
2608 } | 2651 } |
2609 | 2652 |
2610 | 2653 |
2611 | 2654 |
OLD | NEW |