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

Side by Side Diff: mojo/dart/packages/_mojo_for_test_only/lib/sample/sample_service.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 sample_service_mojom; 4 library sample_service_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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 static const List<bindings.StructDataHeader> kVersions = const [ 87 static const List<bindings.StructDataHeader> kVersions = const [
88 const bindings.StructDataHeader(16, 0) 88 const bindings.StructDataHeader(16, 0)
89 ]; 89 ];
90 int alpha = 255; 90 int alpha = 255;
91 int beta = 0; 91 int beta = 0;
92 int gamma = 0; 92 int gamma = 0;
93 BarType type = new BarType(1); 93 BarType type = new BarType(1);
94 94
95 Bar() : super(kVersions.last.size); 95 Bar() : super(kVersions.last.size);
96 96
97 Bar.init(
98 int this.alpha,
99 int this.beta,
100 int this.gamma,
101 BarType this.type
102 ) : super(kVersions.last.size);
103
97 static Bar deserialize(bindings.Message message) { 104 static Bar deserialize(bindings.Message message) {
98 var decoder = new bindings.Decoder(message); 105 var decoder = new bindings.Decoder(message);
99 var result = decode(decoder); 106 var result = decode(decoder);
100 if (decoder.excessHandles != null) { 107 if (decoder.excessHandles != null) {
101 decoder.excessHandles.forEach((h) => h.close()); 108 decoder.excessHandles.forEach((h) => h.close());
102 } 109 }
103 return result; 110 return result;
104 } 111 }
105 112
106 static Bar decode(bindings.Decoder decoder0) { 113 static Bar decode(bindings.Decoder decoder0) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 List<Bar> extraBars = null; 224 List<Bar> extraBars = null;
218 String name = "Fooby"; 225 String name = "Fooby";
219 List<core.MojoDataPipeConsumer> inputStreams = null; 226 List<core.MojoDataPipeConsumer> inputStreams = null;
220 List<core.MojoDataPipeProducer> outputStreams = null; 227 List<core.MojoDataPipeProducer> outputStreams = null;
221 List<List<bool>> arrayOfArrayOfBools = null; 228 List<List<bool>> arrayOfArrayOfBools = null;
222 List<List<List<String>>> multiArrayOfStrings = null; 229 List<List<List<String>>> multiArrayOfStrings = null;
223 List<bool> arrayOfBools = null; 230 List<bool> arrayOfBools = null;
224 231
225 Foo() : super(kVersions.last.size); 232 Foo() : super(kVersions.last.size);
226 233
234 Foo.init(
235 int this.x,
236 int this.y,
237 bool this.a,
238 bool this.b,
239 bool this.c,
240 core.MojoMessagePipeEndpoint this.source,
241 Bar this.bar,
242 List<int> this.data,
243 List<Bar> this.extraBars,
244 String this.name,
245 List<core.MojoDataPipeConsumer> this.inputStreams,
246 List<core.MojoDataPipeProducer> this.outputStreams,
247 List<List<bool>> this.arrayOfArrayOfBools,
248 List<List<List<String>>> this.multiArrayOfStrings,
249 List<bool> this.arrayOfBools
250 ) : super(kVersions.last.size);
251
227 static Foo deserialize(bindings.Message message) { 252 static Foo deserialize(bindings.Message message) {
228 var decoder = new bindings.Decoder(message); 253 var decoder = new bindings.Decoder(message);
229 var result = decode(decoder); 254 var result = decode(decoder);
230 if (decoder.excessHandles != null) { 255 if (decoder.excessHandles != null) {
231 decoder.excessHandles.forEach((h) => h.close()); 256 decoder.excessHandles.forEach((h) => h.close());
232 } 257 }
233 return result; 258 return result;
234 } 259 }
235 260
236 static Foo decode(bindings.Decoder decoder0) { 261 static Foo decode(bindings.Decoder decoder0) {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 int a24 = 4886718345; 595 int a24 = 4886718345;
571 int a25 = -4886718345; 596 int a25 = -4886718345;
572 double a26 = double.INFINITY; 597 double a26 = double.INFINITY;
573 double a27 = double.NEGATIVE_INFINITY; 598 double a27 = double.NEGATIVE_INFINITY;
574 double a28 = double.NAN; 599 double a28 = double.NAN;
575 double a30 = double.NEGATIVE_INFINITY; 600 double a30 = double.NEGATIVE_INFINITY;
576 double a31 = double.NAN; 601 double a31 = double.NAN;
577 602
578 DefaultsTest() : super(kVersions.last.size); 603 DefaultsTest() : super(kVersions.last.size);
579 604
605 DefaultsTest.init(
606 int this.a0,
607 int this.a1,
608 int this.a2,
609 int this.a3,
610 bool this.a11,
611 bool this.a12,
612 int this.a4,
613 int this.a5,
614 int this.a6,
615 int this.a7,
616 int this.a8,
617 int this.a9,
618 int this.a10,
619 double this.a13,
620 double this.a14,
621 double this.a15,
622 double this.a16,
623 double this.a17,
624 List<int> this.a18,
625 String this.a19,
626 BarType this.a20,
627 double this.a29,
628 sample_import_mojom.Point this.a21,
629 sample_import2_mojom.Thing this.a22,
630 int this.a23,
631 int this.a24,
632 int this.a25,
633 double this.a26,
634 double this.a27,
635 double this.a28,
636 double this.a30,
637 double this.a31
638 ) : super(kVersions.last.size);
639
580 static DefaultsTest deserialize(bindings.Message message) { 640 static DefaultsTest deserialize(bindings.Message message) {
581 var decoder = new bindings.Decoder(message); 641 var decoder = new bindings.Decoder(message);
582 var result = decode(decoder); 642 var result = decode(decoder);
583 if (decoder.excessHandles != null) { 643 if (decoder.excessHandles != null) {
584 decoder.excessHandles.forEach((h) => h.close()); 644 decoder.excessHandles.forEach((h) => h.close());
585 } 645 }
586 return result; 646 return result;
587 } 647 }
588 648
589 static DefaultsTest decode(bindings.Decoder decoder0) { 649 static DefaultsTest decode(bindings.Decoder decoder0) {
(...skipping 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 1112
1053 class StructWithHoleV1 extends bindings.Struct { 1113 class StructWithHoleV1 extends bindings.Struct {
1054 static const List<bindings.StructDataHeader> kVersions = const [ 1114 static const List<bindings.StructDataHeader> kVersions = const [
1055 const bindings.StructDataHeader(24, 0) 1115 const bindings.StructDataHeader(24, 0)
1056 ]; 1116 ];
1057 int v1 = 1; 1117 int v1 = 1;
1058 int v2 = 2; 1118 int v2 = 2;
1059 1119
1060 StructWithHoleV1() : super(kVersions.last.size); 1120 StructWithHoleV1() : super(kVersions.last.size);
1061 1121
1122 StructWithHoleV1.init(
1123 int this.v1,
1124 int this.v2
1125 ) : super(kVersions.last.size);
1126
1062 static StructWithHoleV1 deserialize(bindings.Message message) { 1127 static StructWithHoleV1 deserialize(bindings.Message message) {
1063 var decoder = new bindings.Decoder(message); 1128 var decoder = new bindings.Decoder(message);
1064 var result = decode(decoder); 1129 var result = decode(decoder);
1065 if (decoder.excessHandles != null) { 1130 if (decoder.excessHandles != null) {
1066 decoder.excessHandles.forEach((h) => h.close()); 1131 decoder.excessHandles.forEach((h) => h.close());
1067 } 1132 }
1068 return result; 1133 return result;
1069 } 1134 }
1070 1135
1071 static StructWithHoleV1 decode(bindings.Decoder decoder0) { 1136 static StructWithHoleV1 decode(bindings.Decoder decoder0) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
1139 class StructWithHoleV2 extends bindings.Struct { 1204 class StructWithHoleV2 extends bindings.Struct {
1140 static const List<bindings.StructDataHeader> kVersions = const [ 1205 static const List<bindings.StructDataHeader> kVersions = const [
1141 const bindings.StructDataHeader(24, 0) 1206 const bindings.StructDataHeader(24, 0)
1142 ]; 1207 ];
1143 int v1 = 1; 1208 int v1 = 1;
1144 int v3 = 3; 1209 int v3 = 3;
1145 int v2 = 2; 1210 int v2 = 2;
1146 1211
1147 StructWithHoleV2() : super(kVersions.last.size); 1212 StructWithHoleV2() : super(kVersions.last.size);
1148 1213
1214 StructWithHoleV2.init(
1215 int this.v1,
1216 int this.v3,
1217 int this.v2
1218 ) : super(kVersions.last.size);
1219
1149 static StructWithHoleV2 deserialize(bindings.Message message) { 1220 static StructWithHoleV2 deserialize(bindings.Message message) {
1150 var decoder = new bindings.Decoder(message); 1221 var decoder = new bindings.Decoder(message);
1151 var result = decode(decoder); 1222 var result = decode(decoder);
1152 if (decoder.excessHandles != null) { 1223 if (decoder.excessHandles != null) {
1153 decoder.excessHandles.forEach((h) => h.close()); 1224 decoder.excessHandles.forEach((h) => h.close());
1154 } 1225 }
1155 return result; 1226 return result;
1156 } 1227 }
1157 1228
1158 static StructWithHoleV2 decode(bindings.Decoder decoder0) { 1229 static StructWithHoleV2 decode(bindings.Decoder decoder0) {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
1237 1308
1238 1309
1239 class NonNullableMapStruct extends bindings.Struct { 1310 class NonNullableMapStruct extends bindings.Struct {
1240 static const List<bindings.StructDataHeader> kVersions = const [ 1311 static const List<bindings.StructDataHeader> kVersions = const [
1241 const bindings.StructDataHeader(16, 0) 1312 const bindings.StructDataHeader(16, 0)
1242 ]; 1313 ];
1243 Map<String, String> mapField = null; 1314 Map<String, String> mapField = null;
1244 1315
1245 NonNullableMapStruct() : super(kVersions.last.size); 1316 NonNullableMapStruct() : super(kVersions.last.size);
1246 1317
1318 NonNullableMapStruct.init(
1319 Map<String, String> this.mapField
1320 ) : super(kVersions.last.size);
1321
1247 static NonNullableMapStruct deserialize(bindings.Message message) { 1322 static NonNullableMapStruct deserialize(bindings.Message message) {
1248 var decoder = new bindings.Decoder(message); 1323 var decoder = new bindings.Decoder(message);
1249 var result = decode(decoder); 1324 var result = decode(decoder);
1250 if (decoder.excessHandles != null) { 1325 if (decoder.excessHandles != null) {
1251 decoder.excessHandles.forEach((h) => h.close()); 1326 decoder.excessHandles.forEach((h) => h.close());
1252 } 1327 }
1253 return result; 1328 return result;
1254 } 1329 }
1255 1330
1256 static NonNullableMapStruct decode(bindings.Decoder decoder0) { 1331 static NonNullableMapStruct decode(bindings.Decoder decoder0) {
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 class _ServiceFrobinateParams extends bindings.Struct { 1437 class _ServiceFrobinateParams extends bindings.Struct {
1363 static const List<bindings.StructDataHeader> kVersions = const [ 1438 static const List<bindings.StructDataHeader> kVersions = const [
1364 const bindings.StructDataHeader(32, 0) 1439 const bindings.StructDataHeader(32, 0)
1365 ]; 1440 ];
1366 Foo foo = null; 1441 Foo foo = null;
1367 ServiceBazOptions baz = null; 1442 ServiceBazOptions baz = null;
1368 PortInterface port = null; 1443 PortInterface port = null;
1369 1444
1370 _ServiceFrobinateParams() : super(kVersions.last.size); 1445 _ServiceFrobinateParams() : super(kVersions.last.size);
1371 1446
1447 _ServiceFrobinateParams.init(
1448 Foo this.foo,
1449 ServiceBazOptions this.baz,
1450 PortInterface this.port
1451 ) : super(kVersions.last.size);
1452
1372 static _ServiceFrobinateParams deserialize(bindings.Message message) { 1453 static _ServiceFrobinateParams deserialize(bindings.Message message) {
1373 var decoder = new bindings.Decoder(message); 1454 var decoder = new bindings.Decoder(message);
1374 var result = decode(decoder); 1455 var result = decode(decoder);
1375 if (decoder.excessHandles != null) { 1456 if (decoder.excessHandles != null) {
1376 decoder.excessHandles.forEach((h) => h.close()); 1457 decoder.excessHandles.forEach((h) => h.close());
1377 } 1458 }
1378 return result; 1459 return result;
1379 } 1460 }
1380 1461
1381 static _ServiceFrobinateParams decode(bindings.Decoder decoder0) { 1462 static _ServiceFrobinateParams decode(bindings.Decoder decoder0) {
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 1543
1463 1544
1464 class ServiceFrobinateResponseParams extends bindings.Struct { 1545 class ServiceFrobinateResponseParams extends bindings.Struct {
1465 static const List<bindings.StructDataHeader> kVersions = const [ 1546 static const List<bindings.StructDataHeader> kVersions = const [
1466 const bindings.StructDataHeader(16, 0) 1547 const bindings.StructDataHeader(16, 0)
1467 ]; 1548 ];
1468 int result = 0; 1549 int result = 0;
1469 1550
1470 ServiceFrobinateResponseParams() : super(kVersions.last.size); 1551 ServiceFrobinateResponseParams() : super(kVersions.last.size);
1471 1552
1553 ServiceFrobinateResponseParams.init(
1554 int this.result
1555 ) : super(kVersions.last.size);
1556
1472 static ServiceFrobinateResponseParams deserialize(bindings.Message message) { 1557 static ServiceFrobinateResponseParams deserialize(bindings.Message message) {
1473 var decoder = new bindings.Decoder(message); 1558 var decoder = new bindings.Decoder(message);
1474 var result = decode(decoder); 1559 var result = decode(decoder);
1475 if (decoder.excessHandles != null) { 1560 if (decoder.excessHandles != null) {
1476 decoder.excessHandles.forEach((h) => h.close()); 1561 decoder.excessHandles.forEach((h) => h.close());
1477 } 1562 }
1478 return result; 1563 return result;
1479 } 1564 }
1480 1565
1481 static ServiceFrobinateResponseParams decode(bindings.Decoder decoder0) { 1566 static ServiceFrobinateResponseParams decode(bindings.Decoder decoder0) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1534 1619
1535 1620
1536 class _ServiceGetPortParams extends bindings.Struct { 1621 class _ServiceGetPortParams extends bindings.Struct {
1537 static const List<bindings.StructDataHeader> kVersions = const [ 1622 static const List<bindings.StructDataHeader> kVersions = const [
1538 const bindings.StructDataHeader(16, 0) 1623 const bindings.StructDataHeader(16, 0)
1539 ]; 1624 ];
1540 PortInterfaceRequest port = null; 1625 PortInterfaceRequest port = null;
1541 1626
1542 _ServiceGetPortParams() : super(kVersions.last.size); 1627 _ServiceGetPortParams() : super(kVersions.last.size);
1543 1628
1629 _ServiceGetPortParams.init(
1630 PortInterfaceRequest this.port
1631 ) : super(kVersions.last.size);
1632
1544 static _ServiceGetPortParams deserialize(bindings.Message message) { 1633 static _ServiceGetPortParams deserialize(bindings.Message message) {
1545 var decoder = new bindings.Decoder(message); 1634 var decoder = new bindings.Decoder(message);
1546 var result = decode(decoder); 1635 var result = decode(decoder);
1547 if (decoder.excessHandles != null) { 1636 if (decoder.excessHandles != null) {
1548 decoder.excessHandles.forEach((h) => h.close()); 1637 decoder.excessHandles.forEach((h) => h.close());
1549 } 1638 }
1550 return result; 1639 return result;
1551 } 1640 }
1552 1641
1553 static _ServiceGetPortParams decode(bindings.Decoder decoder0) { 1642 static _ServiceGetPortParams decode(bindings.Decoder decoder0) {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1606 1695
1607 class _PortPostMessageParams extends bindings.Struct { 1696 class _PortPostMessageParams extends bindings.Struct {
1608 static const List<bindings.StructDataHeader> kVersions = const [ 1697 static const List<bindings.StructDataHeader> kVersions = const [
1609 const bindings.StructDataHeader(24, 0) 1698 const bindings.StructDataHeader(24, 0)
1610 ]; 1699 ];
1611 String messageText = null; 1700 String messageText = null;
1612 PortInterface port = null; 1701 PortInterface port = null;
1613 1702
1614 _PortPostMessageParams() : super(kVersions.last.size); 1703 _PortPostMessageParams() : super(kVersions.last.size);
1615 1704
1705 _PortPostMessageParams.init(
1706 String this.messageText,
1707 PortInterface this.port
1708 ) : super(kVersions.last.size);
1709
1616 static _PortPostMessageParams deserialize(bindings.Message message) { 1710 static _PortPostMessageParams deserialize(bindings.Message message) {
1617 var decoder = new bindings.Decoder(message); 1711 var decoder = new bindings.Decoder(message);
1618 var result = decode(decoder); 1712 var result = decode(decoder);
1619 if (decoder.excessHandles != null) { 1713 if (decoder.excessHandles != null) {
1620 decoder.excessHandles.forEach((h) => h.close()); 1714 decoder.excessHandles.forEach((h) => h.close());
1621 } 1715 }
1622 return result; 1716 return result;
1623 } 1717 }
1624 1718
1625 static _PortPostMessageParams decode(bindings.Decoder decoder0) { 1719 static _PortPostMessageParams decode(bindings.Decoder decoder0) {
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 return 'ServiceBazOptions.extra'; 1830 return 'ServiceBazOptions.extra';
1737 default: 1831 default:
1738 return null; 1832 return null;
1739 } 1833 }
1740 } 1834 }
1741 1835
1742 int toJson() => mojoEnumValue; 1836 int toJson() => mojoEnumValue;
1743 } 1837 }
1744 1838
1745 class _ServiceServiceDescription implements service_describer.ServiceDescription { 1839 class _ServiceServiceDescription implements service_describer.ServiceDescription {
1746 dynamic getTopLevelInterface([Function responseFactory]) => 1840 void getTopLevelInterface(Function responder) {
1747 responseFactory(null); 1841 responder(null);
1842 }
1748 1843
1749 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 1844 void getTypeDefinition(String typeKey, Function responder) {
1750 responseFactory(null); 1845 responder(null);
1846 }
1751 1847
1752 dynamic getAllTypeDefinitions([Function responseFactory]) => 1848 void getAllTypeDefinitions(Function responder) {
1753 responseFactory(null); 1849 responder(null);
1850 }
1754 } 1851 }
1755 1852
1756 abstract class Service { 1853 abstract class Service {
1757 static const String serviceName = null; 1854 static const String serviceName = null;
1758 1855
1759 static service_describer.ServiceDescription _cachedServiceDescription; 1856 static service_describer.ServiceDescription _cachedServiceDescription;
1760 static service_describer.ServiceDescription get serviceDescription { 1857 static service_describer.ServiceDescription get serviceDescription {
1761 if (_cachedServiceDescription == null) { 1858 if (_cachedServiceDescription == null) {
1762 _cachedServiceDescription = new _ServiceServiceDescription(); 1859 _cachedServiceDescription = new _ServiceServiceDescription();
1763 } 1860 }
1764 return _cachedServiceDescription; 1861 return _cachedServiceDescription;
1765 } 1862 }
1766 1863
1767 static ServiceProxy connectToService( 1864 static ServiceProxy connectToService(
1768 bindings.ServiceConnector s, String url, [String serviceName]) { 1865 bindings.ServiceConnector s, String url, [String serviceName]) {
1769 ServiceProxy p = new ServiceProxy.unbound(); 1866 ServiceProxy p = new ServiceProxy.unbound();
1770 String name = serviceName ?? Service.serviceName; 1867 String name = serviceName ?? Service.serviceName;
1771 if ((name == null) || name.isEmpty) { 1868 if ((name == null) || name.isEmpty) {
1772 throw new core.MojoApiError( 1869 throw new core.MojoApiError(
1773 "If an interface has no ServiceName, then one must be provided."); 1870 "If an interface has no ServiceName, then one must be provided.");
1774 } 1871 }
1775 s.connectToService(url, p, name); 1872 s.connectToService(url, p, name);
1776 return p; 1873 return p;
1777 } 1874 }
1778 dynamic frobinate(Foo foo,ServiceBazOptions baz,PortInterface port,[Function r esponseFactory = null]); 1875 void frobinate(Foo foo,ServiceBazOptions baz,PortInterface port,void callback( int result));
1779 void getPort(PortInterfaceRequest port); 1876 void getPort(PortInterfaceRequest port);
1780 static const int kFavoriteBaz = 1; 1877 static const int kFavoriteBaz = 1;
1781 } 1878 }
1782 1879
1783 abstract class ServiceInterface 1880 abstract class ServiceInterface
1784 implements bindings.MojoInterface<Service>, 1881 implements bindings.MojoInterface<Service>,
1785 Service { 1882 Service {
1786 factory ServiceInterface([Service impl]) => 1883 factory ServiceInterface([Service impl]) =>
1787 new ServiceStub.unbound(impl); 1884 new ServiceStub.unbound(impl);
1788 1885
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
1820 1917
1821 void handleResponse(bindings.ServiceMessage message) { 1918 void handleResponse(bindings.ServiceMessage message) {
1822 switch (message.header.type) { 1919 switch (message.header.type) {
1823 case _serviceMethodFrobinateName: 1920 case _serviceMethodFrobinateName:
1824 var r = ServiceFrobinateResponseParams.deserialize( 1921 var r = ServiceFrobinateResponseParams.deserialize(
1825 message.payload); 1922 message.payload);
1826 if (!message.header.hasRequestId) { 1923 if (!message.header.hasRequestId) {
1827 proxyError("Expected a message with a valid request Id."); 1924 proxyError("Expected a message with a valid request Id.");
1828 return; 1925 return;
1829 } 1926 }
1830 Completer c = completerMap[message.header.requestId]; 1927 Function callback = callbackMap[message.header.requestId];
1831 if (c == null) { 1928 if (callback == null) {
1832 proxyError( 1929 proxyError(
1833 "Message had unknown request Id: ${message.header.requestId}"); 1930 "Message had unknown request Id: ${message.header.requestId}");
1834 return; 1931 return;
1835 } 1932 }
1836 completerMap.remove(message.header.requestId); 1933 callbackMap.remove(message.header.requestId);
1837 if (c.isCompleted) { 1934 callback(r.result );
1838 proxyError("Response completer already completed");
1839 return;
1840 }
1841 c.complete(r);
1842 break; 1935 break;
1843 default: 1936 default:
1844 proxyError("Unexpected message type: ${message.header.type}"); 1937 proxyError("Unexpected message type: ${message.header.type}");
1845 close(immediate: true); 1938 close(immediate: true);
1846 break; 1939 break;
1847 } 1940 }
1848 } 1941 }
1849 1942
1850 @override 1943 @override
1851 String toString() { 1944 String toString() {
(...skipping 24 matching lines...) Expand all
1876 return newMockedProxy; 1969 return newMockedProxy;
1877 } 1970 }
1878 1971
1879 static ServiceProxy newFromEndpoint( 1972 static ServiceProxy newFromEndpoint(
1880 core.MojoMessagePipeEndpoint endpoint) { 1973 core.MojoMessagePipeEndpoint endpoint) {
1881 assert(endpoint.setDescription("For ServiceProxy")); 1974 assert(endpoint.setDescription("For ServiceProxy"));
1882 return new ServiceProxy.fromEndpoint(endpoint); 1975 return new ServiceProxy.fromEndpoint(endpoint);
1883 } 1976 }
1884 1977
1885 1978
1886 dynamic frobinate(Foo foo,ServiceBazOptions baz,PortInterface port,[Function r esponseFactory = null]) { 1979 void frobinate(Foo foo,ServiceBazOptions baz,PortInterface port,void callback( int result)) {
1887 if (impl != null) { 1980 if (impl != null) {
1888 return new Future(() => impl.frobinate(foo,baz,port,_ServiceStubControl._s erviceFrobinateResponseParamsFactory)); 1981 impl.frobinate(foo,baz,port,callback);
1982 return;
1889 } 1983 }
1890 var params = new _ServiceFrobinateParams(); 1984 var params = new _ServiceFrobinateParams();
1891 params.foo = foo; 1985 params.foo = foo;
1892 params.baz = baz; 1986 params.baz = baz;
1893 params.port = port; 1987 params.port = port;
1894 return ctrl.sendMessageWithRequestId( 1988 ctrl.sendMessageWithRequestId(
1895 params, 1989 params,
1896 _serviceMethodFrobinateName, 1990 _serviceMethodFrobinateName,
1897 -1, 1991 -1,
1898 bindings.MessageHeader.kMessageExpectsResponse); 1992 bindings.MessageHeader.kMessageExpectsResponse,
1993 callback);
1899 } 1994 }
1900 void getPort(PortInterfaceRequest port) { 1995 void getPort(PortInterfaceRequest port) {
1901 if (impl != null) { 1996 if (impl != null) {
1902 impl.getPort(port); 1997 impl.getPort(port);
1903 return; 1998 return;
1904 } 1999 }
1905 if (!ctrl.isBound) { 2000 if (!ctrl.isBound) {
1906 ctrl.proxyError("The Proxy is closed."); 2001 ctrl.proxyError("The Proxy is closed.");
1907 return; 2002 return;
1908 } 2003 }
(...skipping 19 matching lines...) Expand all
1928 core.MojoHandle handle, [Service impl]) 2023 core.MojoHandle handle, [Service impl])
1929 : super.fromHandle(handle, autoBegin: impl != null) { 2024 : super.fromHandle(handle, autoBegin: impl != null) {
1930 _impl = impl; 2025 _impl = impl;
1931 } 2026 }
1932 2027
1933 _ServiceStubControl.unbound([this._impl]) : super.unbound(); 2028 _ServiceStubControl.unbound([this._impl]) : super.unbound();
1934 2029
1935 String get serviceName => Service.serviceName; 2030 String get serviceName => Service.serviceName;
1936 2031
1937 2032
1938 static ServiceFrobinateResponseParams _serviceFrobinateResponseParamsFactory(i nt result) { 2033 Function _serviceFrobinateResponseParamsResponder(
1939 var result = new ServiceFrobinateResponseParams(); 2034 int requestId) {
1940 result.result = result; 2035 return (int result) {
1941 return result; 2036 var result = new ServiceFrobinateResponseParams();
2037 result.result = result;
2038 sendResponse(buildResponseWithId(
2039 result,
2040 _serviceMethodFrobinateName,
2041 requestId,
2042 bindings.MessageHeader.kMessageIsResponse));
2043 };
1942 } 2044 }
1943 2045
1944 dynamic handleMessage(bindings.ServiceMessage message) { 2046 void handleMessage(bindings.ServiceMessage message) {
1945 if (bindings.ControlMessageHandler.isControlMessage(message)) { 2047 if (bindings.ControlMessageHandler.isControlMessage(message)) {
1946 return bindings.ControlMessageHandler.handleMessage(this, 2048 bindings.ControlMessageHandler.handleMessage(
1947 0, 2049 this, 0, message);
1948 message); 2050 return;
1949 } 2051 }
1950 if (_impl == null) { 2052 if (_impl == null) {
1951 throw new core.MojoApiError("$this has no implementation set"); 2053 throw new core.MojoApiError("$this has no implementation set");
1952 } 2054 }
1953 switch (message.header.type) { 2055 switch (message.header.type) {
1954 case _serviceMethodFrobinateName: 2056 case _serviceMethodFrobinateName:
1955 var params = _ServiceFrobinateParams.deserialize( 2057 var params = _ServiceFrobinateParams.deserialize(
1956 message.payload); 2058 message.payload);
1957 var response = _impl.frobinate(params.foo,params.baz,params.port,_servic eFrobinateResponseParamsFactory); 2059 _impl.frobinate(params.foo, params.baz, params.port, _serviceFrobinateRe sponseParamsResponder(message.header.requestId));
1958 if (response is Future) {
1959 return response.then((response) {
1960 if (response != null) {
1961 return buildResponseWithId(
1962 response,
1963 _serviceMethodFrobinateName,
1964 message.header.requestId,
1965 bindings.MessageHeader.kMessageIsResponse);
1966 }
1967 });
1968 } else if (response != null) {
1969 return buildResponseWithId(
1970 response,
1971 _serviceMethodFrobinateName,
1972 message.header.requestId,
1973 bindings.MessageHeader.kMessageIsResponse);
1974 }
1975 break; 2060 break;
1976 case _serviceMethodGetPortName: 2061 case _serviceMethodGetPortName:
1977 var params = _ServiceGetPortParams.deserialize( 2062 var params = _ServiceGetPortParams.deserialize(
1978 message.payload); 2063 message.payload);
1979 _impl.getPort(params.port); 2064 _impl.getPort(params.port);
1980 break; 2065 break;
1981 default: 2066 default:
1982 throw new bindings.MojoCodecError("Unexpected message name"); 2067 throw new bindings.MojoCodecError("Unexpected message name");
1983 break; 2068 break;
1984 } 2069 }
1985 return null;
1986 } 2070 }
1987 2071
1988 Service get impl => _impl; 2072 Service get impl => _impl;
1989 set impl(Service d) { 2073 set impl(Service d) {
1990 if (d == null) { 2074 if (d == null) {
1991 throw new core.MojoApiError("$this: Cannot set a null implementation"); 2075 throw new core.MojoApiError("$this: Cannot set a null implementation");
1992 } 2076 }
1993 if (isBound && (_impl == null)) { 2077 if (isBound && (_impl == null)) {
1994 beginHandlingEvents(); 2078 beginHandlingEvents();
1995 } 2079 }
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
2029 core.MojoHandle handle, [Service impl]) 2113 core.MojoHandle handle, [Service impl])
2030 : super(new _ServiceStubControl.fromHandle(handle, impl)); 2114 : super(new _ServiceStubControl.fromHandle(handle, impl));
2031 2115
2032 static ServiceStub newFromEndpoint( 2116 static ServiceStub newFromEndpoint(
2033 core.MojoMessagePipeEndpoint endpoint) { 2117 core.MojoMessagePipeEndpoint endpoint) {
2034 assert(endpoint.setDescription("For ServiceStub")); 2118 assert(endpoint.setDescription("For ServiceStub"));
2035 return new ServiceStub.fromEndpoint(endpoint); 2119 return new ServiceStub.fromEndpoint(endpoint);
2036 } 2120 }
2037 2121
2038 2122
2039 dynamic frobinate(Foo foo,ServiceBazOptions baz,PortInterface port,[Function r esponseFactory = null]) { 2123 void frobinate(Foo foo,ServiceBazOptions baz,PortInterface port,void callback( int result)) {
2040 return impl.frobinate(foo,baz,port,responseFactory); 2124 return impl.frobinate(foo,baz,port,callback);
2041 } 2125 }
2042 void getPort(PortInterfaceRequest port) { 2126 void getPort(PortInterfaceRequest port) {
2043 return impl.getPort(port); 2127 return impl.getPort(port);
2044 } 2128 }
2045 } 2129 }
2046 2130
2047 const int _portMethodPostMessageName = 0; 2131 const int _portMethodPostMessageName = 0;
2048 2132
2049 class _PortServiceDescription implements service_describer.ServiceDescription { 2133 class _PortServiceDescription implements service_describer.ServiceDescription {
2050 dynamic getTopLevelInterface([Function responseFactory]) => 2134 void getTopLevelInterface(Function responder) {
2051 responseFactory(null); 2135 responder(null);
2136 }
2052 2137
2053 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 2138 void getTypeDefinition(String typeKey, Function responder) {
2054 responseFactory(null); 2139 responder(null);
2140 }
2055 2141
2056 dynamic getAllTypeDefinitions([Function responseFactory]) => 2142 void getAllTypeDefinitions(Function responder) {
2057 responseFactory(null); 2143 responder(null);
2144 }
2058 } 2145 }
2059 2146
2060 abstract class Port { 2147 abstract class Port {
2061 static const String serviceName = null; 2148 static const String serviceName = null;
2062 2149
2063 static service_describer.ServiceDescription _cachedServiceDescription; 2150 static service_describer.ServiceDescription _cachedServiceDescription;
2064 static service_describer.ServiceDescription get serviceDescription { 2151 static service_describer.ServiceDescription get serviceDescription {
2065 if (_cachedServiceDescription == null) { 2152 if (_cachedServiceDescription == null) {
2066 _cachedServiceDescription = new _PortServiceDescription(); 2153 _cachedServiceDescription = new _PortServiceDescription();
2067 } 2154 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 : super.fromHandle(handle, autoBegin: impl != null) { 2285 : super.fromHandle(handle, autoBegin: impl != null) {
2199 _impl = impl; 2286 _impl = impl;
2200 } 2287 }
2201 2288
2202 _PortStubControl.unbound([this._impl]) : super.unbound(); 2289 _PortStubControl.unbound([this._impl]) : super.unbound();
2203 2290
2204 String get serviceName => Port.serviceName; 2291 String get serviceName => Port.serviceName;
2205 2292
2206 2293
2207 2294
2208 dynamic handleMessage(bindings.ServiceMessage message) { 2295 void handleMessage(bindings.ServiceMessage message) {
2209 if (bindings.ControlMessageHandler.isControlMessage(message)) { 2296 if (bindings.ControlMessageHandler.isControlMessage(message)) {
2210 return bindings.ControlMessageHandler.handleMessage(this, 2297 bindings.ControlMessageHandler.handleMessage(
2211 0, 2298 this, 0, message);
2212 message); 2299 return;
2213 } 2300 }
2214 if (_impl == null) { 2301 if (_impl == null) {
2215 throw new core.MojoApiError("$this has no implementation set"); 2302 throw new core.MojoApiError("$this has no implementation set");
2216 } 2303 }
2217 switch (message.header.type) { 2304 switch (message.header.type) {
2218 case _portMethodPostMessageName: 2305 case _portMethodPostMessageName:
2219 var params = _PortPostMessageParams.deserialize( 2306 var params = _PortPostMessageParams.deserialize(
2220 message.payload); 2307 message.payload);
2221 _impl.postMessage(params.messageText, params.port); 2308 _impl.postMessage(params.messageText, params.port);
2222 break; 2309 break;
2223 default: 2310 default:
2224 throw new bindings.MojoCodecError("Unexpected message name"); 2311 throw new bindings.MojoCodecError("Unexpected message name");
2225 break; 2312 break;
2226 } 2313 }
2227 return null;
2228 } 2314 }
2229 2315
2230 Port get impl => _impl; 2316 Port get impl => _impl;
2231 set impl(Port d) { 2317 set impl(Port d) {
2232 if (d == null) { 2318 if (d == null) {
2233 throw new core.MojoApiError("$this: Cannot set a null implementation"); 2319 throw new core.MojoApiError("$this: Cannot set a null implementation");
2234 } 2320 }
2235 if (isBound && (_impl == null)) { 2321 if (isBound && (_impl == null)) {
2236 beginHandlingEvents(); 2322 beginHandlingEvents();
2237 } 2323 }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 2375
2290 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { 2376 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
2291 return getRuntimeTypeInfo().typeMap; 2377 return getRuntimeTypeInfo().typeMap;
2292 } 2378 }
2293 2379
2294 var _runtimeTypeInfo; 2380 var _runtimeTypeInfo;
2295 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() { 2381 mojom_types.RuntimeTypeInfo _initRuntimeTypeInfo() {
2296 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of 2382 // serializedRuntimeTypeInfo contains the bytes of the Mojo serialization of
2297 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this 2383 // a mojom_types.RuntimeTypeInfo struct describing the Mojom types in this
2298 // file. The string contains the base64 encoding of the gzip-compressed bytes. 2384 // file. The string contains the base64 encoding of the gzip-compressed bytes.
2299 var serializedRuntimeTypeInfo = "H4sIAAAJbogC/+ydTXAUx/XAe2ZXYiUEEkggIQNaIflv/ i6sL76EyceKICzFQshiTYRT8WpWGqGFXc1mZ1YWPulmnBNHHXXkkIMPOVDJhUOqkksSl0+k4qpQqVTiI 4ccdILMaF+vZnv7Y3q1TK+rMlWP0ex89q9fv37d/brpQaWtA/YjsCd/x/sYsSeve66V9guutLoyB7+vw n4T9tuwfwr7F7Dfwc+D54zj58H+LVc6XUnenZtMfTh5933byOWz5tA1o7B7Pg7fRDk/lHyYNwfdcycp5 6+bK0Yx69hJ03Z477lhWbvvOefKIOX8rLU2W8xmjXTWvGnkbzuF4tLu87x3dlGun7MKu+f7XOmmnL9tF tYzSyZ61z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mna+Kg lnvGnH6L7y2ByQ31vq8+P8TmFnMLUzD+PeQK7f6mSSvNRSOdYu3I2L1NeuSH2e9G/n/0BDrOZOHHVwWk f95+vZ6mJK8+WUHXccXj1fx1jXbYqxLexcFP7/Ry/w01nzQeBO8vKzju8VYV/aTkPCSPYzT2ftlWfX2W fRbrbdT7vV2ysH358j/fGB7PxZuPzfkt6P+fvr/+itUf/Mhq7+i+hVtgpeXdbS3GOtCL4WEV8SDvbPX4 /8FAAD//4zC5ZC4cAAA";
2300 2386
2301 // Deserialize RuntimeTypeInfo 2387 // Deserialize RuntimeTypeInfo
2302 var bytes = BASE64.decode(serializedRuntimeTypeInfo); 2388 var bytes = BASE64.decode(serializedRuntimeTypeInfo);
2303 var unzippedBytes = new ZLibDecoder().convert(bytes); 2389 var unzippedBytes = new ZLibDecoder().convert(bytes);
2304 var bdata = new ByteData.view(unzippedBytes.buffer); 2390 var bdata = new ByteData.view(unzippedBytes.buffer);
2305 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0); 2391 var message = new bindings.Message(bdata, null, unzippedBytes.length, 0);
2306 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message); 2392 _runtimeTypeInfo = mojom_types.RuntimeTypeInfo.deserialize(message);
2307 sample_import_mojom.getAllMojomTypeDefinitions() 2393 sample_import_mojom.getAllMojomTypeDefinitions()
2308 .forEach((String s, mojom_types.UserDefinedType udt) { 2394 .forEach((String s, mojom_types.UserDefinedType udt) {
2309 _runtimeTypeInfo.typeMap[s] = udt; 2395 _runtimeTypeInfo.typeMap[s] = udt;
2310 }); 2396 });
2311 2397
2312 sample_import2_mojom.getAllMojomTypeDefinitions() 2398 sample_import2_mojom.getAllMojomTypeDefinitions()
2313 .forEach((String s, mojom_types.UserDefinedType udt) { 2399 .forEach((String s, mojom_types.UserDefinedType udt) {
2314 _runtimeTypeInfo.typeMap[s] = udt; 2400 _runtimeTypeInfo.typeMap[s] = udt;
2315 }); 2401 });
2316 2402
2317 return _runtimeTypeInfo; 2403 return _runtimeTypeInfo;
2318 } 2404 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698