Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(470)

Side by Side Diff: mojo/dart/packages/_mojo_for_test_only/lib/dart_to_cpp/dart_to_cpp.mojom.dart

Issue 2006093002: Dart: Futures -> Callbacks. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Merge Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 dart_to_cpp_mojom; 4 library dart_to_cpp_mojom;
5 import 'dart:async'; 5 import 'dart:async';
6 import 'dart:collection'; 6 import 'dart:collection';
7 import 'dart:convert'; 7 import 'dart:convert';
8 import 'dart:io'; 8 import 'dart:io';
9 import 'dart:typed_data'; 9 import 'dart:typed_data';
10 import 'package:mojo/bindings.dart' as bindings; 10 import 'package:mojo/bindings.dart' as bindings;
(...skipping 21 matching lines...) Expand all
32 core.MojoMessagePipeEndpoint messageHandle = null; 32 core.MojoMessagePipeEndpoint messageHandle = null;
33 double doubleVal = 0.0; 33 double doubleVal = 0.0;
34 double doubleInf = 0.0; 34 double doubleInf = 0.0;
35 double doubleNan = 0.0; 35 double doubleNan = 0.0;
36 String name = null; 36 String name = null;
37 List<String> stringArray = null; 37 List<String> stringArray = null;
38 core.MojoDataPipeConsumer dataHandle = null; 38 core.MojoDataPipeConsumer dataHandle = null;
39 39
40 EchoArgs() : super(kVersions.last.size); 40 EchoArgs() : super(kVersions.last.size);
41 41
42 EchoArgs.init(
43 int this.si64,
44 int this.si32,
45 int this.si16,
46 int this.si8,
47 int this.ui8,
48 int this.ui64,
49 int this.ui32,
50 int this.ui16,
51 double this.floatVal,
52 double this.floatInf,
53 double this.floatNan,
54 core.MojoMessagePipeEndpoint this.messageHandle,
55 double this.doubleVal,
56 double this.doubleInf,
57 double this.doubleNan,
58 String this.name,
59 List<String> this.stringArray,
60 core.MojoDataPipeConsumer this.dataHandle
61 ) : super(kVersions.last.size);
62
42 static EchoArgs deserialize(bindings.Message message) { 63 static EchoArgs deserialize(bindings.Message message) {
43 var decoder = new bindings.Decoder(message); 64 var decoder = new bindings.Decoder(message);
44 var result = decode(decoder); 65 var result = decode(decoder);
45 if (decoder.excessHandles != null) { 66 if (decoder.excessHandles != null) {
46 decoder.excessHandles.forEach((h) => h.close()); 67 decoder.excessHandles.forEach((h) => h.close());
47 } 68 }
48 return result; 69 return result;
49 } 70 }
50 71
51 static EchoArgs decode(bindings.Decoder decoder0) { 72 static EchoArgs decode(bindings.Decoder decoder0) {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 346
326 class EchoArgsList extends bindings.Struct { 347 class EchoArgsList extends bindings.Struct {
327 static const List<bindings.StructDataHeader> kVersions = const [ 348 static const List<bindings.StructDataHeader> kVersions = const [
328 const bindings.StructDataHeader(24, 0) 349 const bindings.StructDataHeader(24, 0)
329 ]; 350 ];
330 EchoArgsList next = null; 351 EchoArgsList next = null;
331 EchoArgs item = null; 352 EchoArgs item = null;
332 353
333 EchoArgsList() : super(kVersions.last.size); 354 EchoArgsList() : super(kVersions.last.size);
334 355
356 EchoArgsList.init(
357 EchoArgsList this.next,
358 EchoArgs this.item
359 ) : super(kVersions.last.size);
360
335 static EchoArgsList deserialize(bindings.Message message) { 361 static EchoArgsList deserialize(bindings.Message message) {
336 var decoder = new bindings.Decoder(message); 362 var decoder = new bindings.Decoder(message);
337 var result = decode(decoder); 363 var result = decode(decoder);
338 if (decoder.excessHandles != null) { 364 if (decoder.excessHandles != null) {
339 decoder.excessHandles.forEach((h) => h.close()); 365 decoder.excessHandles.forEach((h) => h.close());
340 } 366 }
341 return result; 367 return result;
342 } 368 }
343 369
344 static EchoArgsList decode(bindings.Decoder decoder0) { 370 static EchoArgsList decode(bindings.Decoder decoder0) {
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 } 435 }
410 436
411 437
412 class _CppSideStartTestParams extends bindings.Struct { 438 class _CppSideStartTestParams extends bindings.Struct {
413 static const List<bindings.StructDataHeader> kVersions = const [ 439 static const List<bindings.StructDataHeader> kVersions = const [
414 const bindings.StructDataHeader(8, 0) 440 const bindings.StructDataHeader(8, 0)
415 ]; 441 ];
416 442
417 _CppSideStartTestParams() : super(kVersions.last.size); 443 _CppSideStartTestParams() : super(kVersions.last.size);
418 444
445 _CppSideStartTestParams.init(
446 ) : super(kVersions.last.size);
447
419 static _CppSideStartTestParams deserialize(bindings.Message message) { 448 static _CppSideStartTestParams deserialize(bindings.Message message) {
420 var decoder = new bindings.Decoder(message); 449 var decoder = new bindings.Decoder(message);
421 var result = decode(decoder); 450 var result = decode(decoder);
422 if (decoder.excessHandles != null) { 451 if (decoder.excessHandles != null) {
423 decoder.excessHandles.forEach((h) => h.close()); 452 decoder.excessHandles.forEach((h) => h.close());
424 } 453 }
425 return result; 454 return result;
426 } 455 }
427 456
428 static _CppSideStartTestParams decode(bindings.Decoder decoder0) { 457 static _CppSideStartTestParams decode(bindings.Decoder decoder0) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 496 }
468 497
469 498
470 class _CppSideTestFinishedParams extends bindings.Struct { 499 class _CppSideTestFinishedParams extends bindings.Struct {
471 static const List<bindings.StructDataHeader> kVersions = const [ 500 static const List<bindings.StructDataHeader> kVersions = const [
472 const bindings.StructDataHeader(8, 0) 501 const bindings.StructDataHeader(8, 0)
473 ]; 502 ];
474 503
475 _CppSideTestFinishedParams() : super(kVersions.last.size); 504 _CppSideTestFinishedParams() : super(kVersions.last.size);
476 505
506 _CppSideTestFinishedParams.init(
507 ) : super(kVersions.last.size);
508
477 static _CppSideTestFinishedParams deserialize(bindings.Message message) { 509 static _CppSideTestFinishedParams deserialize(bindings.Message message) {
478 var decoder = new bindings.Decoder(message); 510 var decoder = new bindings.Decoder(message);
479 var result = decode(decoder); 511 var result = decode(decoder);
480 if (decoder.excessHandles != null) { 512 if (decoder.excessHandles != null) {
481 decoder.excessHandles.forEach((h) => h.close()); 513 decoder.excessHandles.forEach((h) => h.close());
482 } 514 }
483 return result; 515 return result;
484 } 516 }
485 517
486 static _CppSideTestFinishedParams decode(bindings.Decoder decoder0) { 518 static _CppSideTestFinishedParams decode(bindings.Decoder decoder0) {
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 557 }
526 558
527 559
528 class _CppSidePingResponseParams extends bindings.Struct { 560 class _CppSidePingResponseParams extends bindings.Struct {
529 static const List<bindings.StructDataHeader> kVersions = const [ 561 static const List<bindings.StructDataHeader> kVersions = const [
530 const bindings.StructDataHeader(8, 0) 562 const bindings.StructDataHeader(8, 0)
531 ]; 563 ];
532 564
533 _CppSidePingResponseParams() : super(kVersions.last.size); 565 _CppSidePingResponseParams() : super(kVersions.last.size);
534 566
567 _CppSidePingResponseParams.init(
568 ) : super(kVersions.last.size);
569
535 static _CppSidePingResponseParams deserialize(bindings.Message message) { 570 static _CppSidePingResponseParams deserialize(bindings.Message message) {
536 var decoder = new bindings.Decoder(message); 571 var decoder = new bindings.Decoder(message);
537 var result = decode(decoder); 572 var result = decode(decoder);
538 if (decoder.excessHandles != null) { 573 if (decoder.excessHandles != null) {
539 decoder.excessHandles.forEach((h) => h.close()); 574 decoder.excessHandles.forEach((h) => h.close());
540 } 575 }
541 return result; 576 return result;
542 } 577 }
543 578
544 static _CppSidePingResponseParams decode(bindings.Decoder decoder0) { 579 static _CppSidePingResponseParams decode(bindings.Decoder decoder0) {
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
584 619
585 620
586 class _CppSideEchoResponseParams extends bindings.Struct { 621 class _CppSideEchoResponseParams extends bindings.Struct {
587 static const List<bindings.StructDataHeader> kVersions = const [ 622 static const List<bindings.StructDataHeader> kVersions = const [
588 const bindings.StructDataHeader(16, 0) 623 const bindings.StructDataHeader(16, 0)
589 ]; 624 ];
590 EchoArgsList list = null; 625 EchoArgsList list = null;
591 626
592 _CppSideEchoResponseParams() : super(kVersions.last.size); 627 _CppSideEchoResponseParams() : super(kVersions.last.size);
593 628
629 _CppSideEchoResponseParams.init(
630 EchoArgsList this.list
631 ) : super(kVersions.last.size);
632
594 static _CppSideEchoResponseParams deserialize(bindings.Message message) { 633 static _CppSideEchoResponseParams deserialize(bindings.Message message) {
595 var decoder = new bindings.Decoder(message); 634 var decoder = new bindings.Decoder(message);
596 var result = decode(decoder); 635 var result = decode(decoder);
597 if (decoder.excessHandles != null) { 636 if (decoder.excessHandles != null) {
598 decoder.excessHandles.forEach((h) => h.close()); 637 decoder.excessHandles.forEach((h) => h.close());
599 } 638 }
600 return result; 639 return result;
601 } 640 }
602 641
603 static _CppSideEchoResponseParams decode(bindings.Decoder decoder0) { 642 static _CppSideEchoResponseParams decode(bindings.Decoder decoder0) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 695
657 696
658 class _DartSideSetClientParams extends bindings.Struct { 697 class _DartSideSetClientParams extends bindings.Struct {
659 static const List<bindings.StructDataHeader> kVersions = const [ 698 static const List<bindings.StructDataHeader> kVersions = const [
660 const bindings.StructDataHeader(16, 0) 699 const bindings.StructDataHeader(16, 0)
661 ]; 700 ];
662 CppSideInterface cppSide = null; 701 CppSideInterface cppSide = null;
663 702
664 _DartSideSetClientParams() : super(kVersions.last.size); 703 _DartSideSetClientParams() : super(kVersions.last.size);
665 704
705 _DartSideSetClientParams.init(
706 CppSideInterface this.cppSide
707 ) : super(kVersions.last.size);
708
666 static _DartSideSetClientParams deserialize(bindings.Message message) { 709 static _DartSideSetClientParams deserialize(bindings.Message message) {
667 var decoder = new bindings.Decoder(message); 710 var decoder = new bindings.Decoder(message);
668 var result = decode(decoder); 711 var result = decode(decoder);
669 if (decoder.excessHandles != null) { 712 if (decoder.excessHandles != null) {
670 decoder.excessHandles.forEach((h) => h.close()); 713 decoder.excessHandles.forEach((h) => h.close());
671 } 714 }
672 return result; 715 return result;
673 } 716 }
674 717
675 static _DartSideSetClientParams decode(bindings.Decoder decoder0) { 718 static _DartSideSetClientParams decode(bindings.Decoder decoder0) {
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
726 } 769 }
727 770
728 771
729 class _DartSidePingParams extends bindings.Struct { 772 class _DartSidePingParams extends bindings.Struct {
730 static const List<bindings.StructDataHeader> kVersions = const [ 773 static const List<bindings.StructDataHeader> kVersions = const [
731 const bindings.StructDataHeader(8, 0) 774 const bindings.StructDataHeader(8, 0)
732 ]; 775 ];
733 776
734 _DartSidePingParams() : super(kVersions.last.size); 777 _DartSidePingParams() : super(kVersions.last.size);
735 778
779 _DartSidePingParams.init(
780 ) : super(kVersions.last.size);
781
736 static _DartSidePingParams deserialize(bindings.Message message) { 782 static _DartSidePingParams deserialize(bindings.Message message) {
737 var decoder = new bindings.Decoder(message); 783 var decoder = new bindings.Decoder(message);
738 var result = decode(decoder); 784 var result = decode(decoder);
739 if (decoder.excessHandles != null) { 785 if (decoder.excessHandles != null) {
740 decoder.excessHandles.forEach((h) => h.close()); 786 decoder.excessHandles.forEach((h) => h.close());
741 } 787 }
742 return result; 788 return result;
743 } 789 }
744 790
745 static _DartSidePingParams decode(bindings.Decoder decoder0) { 791 static _DartSidePingParams decode(bindings.Decoder decoder0) {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 832
787 class _DartSideEchoParams extends bindings.Struct { 833 class _DartSideEchoParams extends bindings.Struct {
788 static const List<bindings.StructDataHeader> kVersions = const [ 834 static const List<bindings.StructDataHeader> kVersions = const [
789 const bindings.StructDataHeader(24, 0) 835 const bindings.StructDataHeader(24, 0)
790 ]; 836 ];
791 int numIterations = 0; 837 int numIterations = 0;
792 EchoArgs arg = null; 838 EchoArgs arg = null;
793 839
794 _DartSideEchoParams() : super(kVersions.last.size); 840 _DartSideEchoParams() : super(kVersions.last.size);
795 841
842 _DartSideEchoParams.init(
843 int this.numIterations,
844 EchoArgs this.arg
845 ) : super(kVersions.last.size);
846
796 static _DartSideEchoParams deserialize(bindings.Message message) { 847 static _DartSideEchoParams deserialize(bindings.Message message) {
797 var decoder = new bindings.Decoder(message); 848 var decoder = new bindings.Decoder(message);
798 var result = decode(decoder); 849 var result = decode(decoder);
799 if (decoder.excessHandles != null) { 850 if (decoder.excessHandles != null) {
800 decoder.excessHandles.forEach((h) => h.close()); 851 decoder.excessHandles.forEach((h) => h.close());
801 } 852 }
802 return result; 853 return result;
803 } 854 }
804 855
805 static _DartSideEchoParams decode(bindings.Decoder decoder0) { 856 static _DartSideEchoParams decode(bindings.Decoder decoder0) {
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
867 'Object containing handles cannot be encoded to JSON.'); 918 'Object containing handles cannot be encoded to JSON.');
868 } 919 }
869 } 920 }
870 921
871 const int _cppSideMethodStartTestName = 88888888; 922 const int _cppSideMethodStartTestName = 88888888;
872 const int _cppSideMethodTestFinishedName = 99999999; 923 const int _cppSideMethodTestFinishedName = 99999999;
873 const int _cppSideMethodPingResponseName = 100000000; 924 const int _cppSideMethodPingResponseName = 100000000;
874 const int _cppSideMethodEchoResponseName = 100000001; 925 const int _cppSideMethodEchoResponseName = 100000001;
875 926
876 class _CppSideServiceDescription implements service_describer.ServiceDescription { 927 class _CppSideServiceDescription implements service_describer.ServiceDescription {
877 dynamic getTopLevelInterface([Function responseFactory]) => 928 void getTopLevelInterface(Function responder) {
878 responseFactory(null); 929 responder(null);
930 }
879 931
880 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 932 void getTypeDefinition(String typeKey, Function responder) {
881 responseFactory(null); 933 responder(null);
934 }
882 935
883 dynamic getAllTypeDefinitions([Function responseFactory]) => 936 void getAllTypeDefinitions(Function responder) {
884 responseFactory(null); 937 responder(null);
938 }
885 } 939 }
886 940
887 abstract class CppSide { 941 abstract class CppSide {
888 static const String serviceName = null; 942 static const String serviceName = null;
889 943
890 static service_describer.ServiceDescription _cachedServiceDescription; 944 static service_describer.ServiceDescription _cachedServiceDescription;
891 static service_describer.ServiceDescription get serviceDescription { 945 static service_describer.ServiceDescription get serviceDescription {
892 if (_cachedServiceDescription == null) { 946 if (_cachedServiceDescription == null) {
893 _cachedServiceDescription = new _CppSideServiceDescription(); 947 _cachedServiceDescription = new _CppSideServiceDescription();
894 } 948 }
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 : super.fromHandle(handle, autoBegin: impl != null) { 1120 : super.fromHandle(handle, autoBegin: impl != null) {
1067 _impl = impl; 1121 _impl = impl;
1068 } 1122 }
1069 1123
1070 _CppSideStubControl.unbound([this._impl]) : super.unbound(); 1124 _CppSideStubControl.unbound([this._impl]) : super.unbound();
1071 1125
1072 String get serviceName => CppSide.serviceName; 1126 String get serviceName => CppSide.serviceName;
1073 1127
1074 1128
1075 1129
1076 dynamic handleMessage(bindings.ServiceMessage message) { 1130 void handleMessage(bindings.ServiceMessage message) {
1077 if (bindings.ControlMessageHandler.isControlMessage(message)) { 1131 if (bindings.ControlMessageHandler.isControlMessage(message)) {
1078 return bindings.ControlMessageHandler.handleMessage(this, 1132 bindings.ControlMessageHandler.handleMessage(
1079 0, 1133 this, 0, message);
1080 message); 1134 return;
1081 } 1135 }
1082 if (_impl == null) { 1136 if (_impl == null) {
1083 throw new core.MojoApiError("$this has no implementation set"); 1137 throw new core.MojoApiError("$this has no implementation set");
1084 } 1138 }
1085 switch (message.header.type) { 1139 switch (message.header.type) {
1086 case _cppSideMethodStartTestName: 1140 case _cppSideMethodStartTestName:
1087 _impl.startTest(); 1141 _impl.startTest();
1088 break; 1142 break;
1089 case _cppSideMethodTestFinishedName: 1143 case _cppSideMethodTestFinishedName:
1090 _impl.testFinished(); 1144 _impl.testFinished();
1091 break; 1145 break;
1092 case _cppSideMethodPingResponseName: 1146 case _cppSideMethodPingResponseName:
1093 _impl.pingResponse(); 1147 _impl.pingResponse();
1094 break; 1148 break;
1095 case _cppSideMethodEchoResponseName: 1149 case _cppSideMethodEchoResponseName:
1096 var params = _CppSideEchoResponseParams.deserialize( 1150 var params = _CppSideEchoResponseParams.deserialize(
1097 message.payload); 1151 message.payload);
1098 _impl.echoResponse(params.list); 1152 _impl.echoResponse(params.list);
1099 break; 1153 break;
1100 default: 1154 default:
1101 throw new bindings.MojoCodecError("Unexpected message name"); 1155 throw new bindings.MojoCodecError("Unexpected message name");
1102 break; 1156 break;
1103 } 1157 }
1104 return null;
1105 } 1158 }
1106 1159
1107 CppSide get impl => _impl; 1160 CppSide get impl => _impl;
1108 set impl(CppSide d) { 1161 set impl(CppSide d) {
1109 if (d == null) { 1162 if (d == null) {
1110 throw new core.MojoApiError("$this: Cannot set a null implementation"); 1163 throw new core.MojoApiError("$this: Cannot set a null implementation");
1111 } 1164 }
1112 if (isBound && (_impl == null)) { 1165 if (isBound && (_impl == null)) {
1113 beginHandlingEvents(); 1166 beginHandlingEvents();
1114 } 1167 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1167 void echoResponse(EchoArgsList list) { 1220 void echoResponse(EchoArgsList list) {
1168 return impl.echoResponse(list); 1221 return impl.echoResponse(list);
1169 } 1222 }
1170 } 1223 }
1171 1224
1172 const int _dartSideMethodSetClientName = 0; 1225 const int _dartSideMethodSetClientName = 0;
1173 const int _dartSideMethodPingName = 1; 1226 const int _dartSideMethodPingName = 1;
1174 const int _dartSideMethodEchoName = 2; 1227 const int _dartSideMethodEchoName = 2;
1175 1228
1176 class _DartSideServiceDescription implements service_describer.ServiceDescriptio n { 1229 class _DartSideServiceDescription implements service_describer.ServiceDescriptio n {
1177 dynamic getTopLevelInterface([Function responseFactory]) => 1230 void getTopLevelInterface(Function responder) {
1178 responseFactory(null); 1231 responder(null);
1232 }
1179 1233
1180 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 1234 void getTypeDefinition(String typeKey, Function responder) {
1181 responseFactory(null); 1235 responder(null);
1236 }
1182 1237
1183 dynamic getAllTypeDefinitions([Function responseFactory]) => 1238 void getAllTypeDefinitions(Function responder) {
1184 responseFactory(null); 1239 responder(null);
1240 }
1185 } 1241 }
1186 1242
1187 abstract class DartSide { 1243 abstract class DartSide {
1188 static const String serviceName = null; 1244 static const String serviceName = null;
1189 1245
1190 static service_describer.ServiceDescription _cachedServiceDescription; 1246 static service_describer.ServiceDescription _cachedServiceDescription;
1191 static service_describer.ServiceDescription get serviceDescription { 1247 static service_describer.ServiceDescription get serviceDescription {
1192 if (_cachedServiceDescription == null) { 1248 if (_cachedServiceDescription == null) {
1193 _cachedServiceDescription = new _DartSideServiceDescription(); 1249 _cachedServiceDescription = new _DartSideServiceDescription();
1194 } 1250 }
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 : super.fromHandle(handle, autoBegin: impl != null) { 1410 : super.fromHandle(handle, autoBegin: impl != null) {
1355 _impl = impl; 1411 _impl = impl;
1356 } 1412 }
1357 1413
1358 _DartSideStubControl.unbound([this._impl]) : super.unbound(); 1414 _DartSideStubControl.unbound([this._impl]) : super.unbound();
1359 1415
1360 String get serviceName => DartSide.serviceName; 1416 String get serviceName => DartSide.serviceName;
1361 1417
1362 1418
1363 1419
1364 dynamic handleMessage(bindings.ServiceMessage message) { 1420 void handleMessage(bindings.ServiceMessage message) {
1365 if (bindings.ControlMessageHandler.isControlMessage(message)) { 1421 if (bindings.ControlMessageHandler.isControlMessage(message)) {
1366 return bindings.ControlMessageHandler.handleMessage(this, 1422 bindings.ControlMessageHandler.handleMessage(
1367 0, 1423 this, 0, message);
1368 message); 1424 return;
1369 } 1425 }
1370 if (_impl == null) { 1426 if (_impl == null) {
1371 throw new core.MojoApiError("$this has no implementation set"); 1427 throw new core.MojoApiError("$this has no implementation set");
1372 } 1428 }
1373 switch (message.header.type) { 1429 switch (message.header.type) {
1374 case _dartSideMethodSetClientName: 1430 case _dartSideMethodSetClientName:
1375 var params = _DartSideSetClientParams.deserialize( 1431 var params = _DartSideSetClientParams.deserialize(
1376 message.payload); 1432 message.payload);
1377 _impl.setClient(params.cppSide); 1433 _impl.setClient(params.cppSide);
1378 break; 1434 break;
1379 case _dartSideMethodPingName: 1435 case _dartSideMethodPingName:
1380 _impl.ping(); 1436 _impl.ping();
1381 break; 1437 break;
1382 case _dartSideMethodEchoName: 1438 case _dartSideMethodEchoName:
1383 var params = _DartSideEchoParams.deserialize( 1439 var params = _DartSideEchoParams.deserialize(
1384 message.payload); 1440 message.payload);
1385 _impl.echo(params.numIterations, params.arg); 1441 _impl.echo(params.numIterations, params.arg);
1386 break; 1442 break;
1387 default: 1443 default:
1388 throw new bindings.MojoCodecError("Unexpected message name"); 1444 throw new bindings.MojoCodecError("Unexpected message name");
1389 break; 1445 break;
1390 } 1446 }
1391 return null;
1392 } 1447 }
1393 1448
1394 DartSide get impl => _impl; 1449 DartSide get impl => _impl;
1395 set impl(DartSide d) { 1450 set impl(DartSide d) {
1396 if (d == null) { 1451 if (d == null) {
1397 throw new core.MojoApiError("$this: Cannot set a null implementation"); 1452 throw new core.MojoApiError("$this: Cannot set a null implementation");
1398 } 1453 }
1399 if (isBound && (_impl == null)) { 1454 if (isBound && (_impl == null)) {
1400 beginHandlingEvents(); 1455 beginHandlingEvents();
1401 } 1456 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 1514
1460 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { 1515 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
1461 return getRuntimeTypeInfo().typeMap; 1516 return getRuntimeTypeInfo().typeMap;
1462 } 1517 }
1463 1518
1464 var _runtimeTypeInfo; 1519 var _runtimeTypeInfo;
1465 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { 1520 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() {
1466 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of 1521 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of
1467 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this 1522 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this
1468 // file. The string contains the base64 encoding of the gzip-compressed bytes. 1523 // file. The string contains the base64 encoding of the gzip-compressed bytes.
1469 var serializedRuntimeTypeInfo = "H4sIAAAJbogC/9yaz2/bNhTHJdlObMdOnMTNvK3rPKDFs mKN0x8ojJ08dBkyrBiMtSjak6vGrK3Blj1JHrJbjjvu2D9lf8L+hByz2467FNitJdtHh6VJmRIs0YmAB 1oxY/H74ePT45NqxvujAu0+tPzfaZvnWr7fKbS72LLY6nDegvY5tCfQXsd2FdvjZ+2Dzo8Hz77p2l7QC Uado/F478F4/MjpItLvBrbPZP2+w5+hY2i/g6P+6Fuv5+Pvv8L2xbx+Dx0/gHEegh6iM4Otyeh+d752f m4SnTsfnv9185yLwXChx3/ceYs7p/NCr/sGjkNDfGxgW8VGEX6KP29jk+CdmUfCsYjtCbafsDX6oyFqe JPuaOi4yGsMR7+MGr539P4D+dXGxHWCAPmB30DDF6jbRV6HnOLO7EVJ/+Hs9eqMPxHOzScPc2/OXueMf 17nTGy8P+1awCULXFbEfM84LuR3w/jy/fYlfDexFbA9CrC2x2jqJ7yuL7FZCXKsc9c949p5OqkfNSU6P watU523PPTrRK6XHknpzRsfris+DhlcfJrnD+98TIUT7meG+EMVW4nEEzzy7x3X8fuoK+Jz84L7w1XQy upkXeKi+wOJN6qcLAV/aDtu72fkj0euj0R8bl0Sf2B1XiZ/MCP4Q0bBH0hqEeYPe5r8oW0t1h9YnTr9g feDFpdHke/JBP9rqB0qfFi/4o8S5DEDR8xjDxgmPf+GJP9i/ZRNgaPmy2Hrz2Sum1Y+XIGx0K0C9VPJN mJmXm5ryoersL+g3Czm+wwzzhPodJxTvM9F9Oe5eTAKHgwc5Mrywjua4lrLWnAeTHVqzoOXLa7R/eYR7 ClF81/VENdqkv2wat0hbhw75fOICJxNhfsHybdEfnc35XV2yrWq60wlb77IeSQ//1YEPpbC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xftY8CoL2VxPwyCnx4MePFU145CXry5PyWFDiwY8fF U14LErWSSblsagQP4aC+LGqSTy1BO2vJeCRV1ivfNjznaj5q9MTrNetac7lSgIuBWUurvdQwGVdcy5bC bgUlbl4jifgsqEJF1Pgx24CLksSLmsw5rf94VEPnXYklsumJvFWxKWegEtJncuoI7FcLmjOpZGAS1mdy 6gjsVwuasDFlKwjHSTgsqyQr3hOn7sPWU15H7Ii2H+g+VgS4Rwm4LOicO4ijALX6zSdIHB+43GK9+PSX m8zwQd2nUw076E5ZiUcv0zAsSLheAHmRn0Uhk4HNbuO1+6h8xw/BLaz0JuZgNO9BJxWJZzWIWduO5Ezg sTRGzn/e3lGnKwx67Ik1nYF67J54PhmzH5Kg1mXPVTYT6GPhNTgnaJjIyzPyymvY7D7LY9Nvc4PeegRd 1/qE/g9izj3Ps8PzXo/J+buRqgvOo9T0oB7Wvs5/wcAAP//rWXXIMgyAAA=";
1470 1525
1471 // Deserialize RuntimeTypeInfo 1526 // Deserialize RuntimeTypeInfo
1472 var bytes = BASE64.decode(serializedRuntimeTypeInfo); 1527 var bytes = BASE64.decode(serializedRuntimeTypeInfo);
1473 var unzippedBytes = new ZLibDecoder().convert(bytes); 1528 var unzippedBytes = new ZLibDecoder().convert(bytes);
1474 var bdata = new ByteData.view(unzippedBytes.buffer); 1529 var bdata = new ByteData.view(unzippedBytes.buffer);
1475 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); 1530 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0);
1476 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); 1531 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message);
1477 return _runtimeTypeInfo; 1532 return _runtimeTypeInfo;
1478 } 1533 }
OLDNEW
« no previous file with comments | « mojo/dart/embedder/io/socket_patch.dart ('k') | mojo/dart/packages/_mojo_for_test_only/lib/imported/sample_import.mojom.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698