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 network_service_mojom; | 5 library network_service_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 import 'package:mojo/mojo/network_error.mojom.dart' as network_error_mojom; | 10 import 'package:mojo/mojo/network_error.mojom.dart' as network_error_mojom; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 "loader: $loader" ")"; | 85 "loader: $loader" ")"; |
86 } | 86 } |
87 | 87 |
88 Map toJson() { | 88 Map toJson() { |
89 throw new bindings.MojoCodecError( | 89 throw new bindings.MojoCodecError( |
90 'Object containing handles cannot be encoded to JSON.'); | 90 'Object containing handles cannot be encoded to JSON.'); |
91 } | 91 } |
92 } | 92 } |
93 | 93 |
94 | 94 |
95 | |
96 | |
97 class _NetworkServiceGetCookieStoreParams extends bindings.Struct { | 95 class _NetworkServiceGetCookieStoreParams extends bindings.Struct { |
98 static const List<bindings.StructDataHeader> kVersions = const [ | 96 static const List<bindings.StructDataHeader> kVersions = const [ |
99 const bindings.StructDataHeader(16, 0) | 97 const bindings.StructDataHeader(16, 0) |
100 ]; | 98 ]; |
101 Object cookieStore = null; | 99 Object cookieStore = null; |
102 | 100 |
103 _NetworkServiceGetCookieStoreParams() : super(kVersions.last.size); | 101 _NetworkServiceGetCookieStoreParams() : super(kVersions.last.size); |
104 | 102 |
105 static _NetworkServiceGetCookieStoreParams deserialize(bindings.Message messag
e) { | 103 static _NetworkServiceGetCookieStoreParams deserialize(bindings.Message messag
e) { |
106 var decoder = new bindings.Decoder(message); | 104 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 "cookieStore: $cookieStore" ")"; | 156 "cookieStore: $cookieStore" ")"; |
159 } | 157 } |
160 | 158 |
161 Map toJson() { | 159 Map toJson() { |
162 throw new bindings.MojoCodecError( | 160 throw new bindings.MojoCodecError( |
163 'Object containing handles cannot be encoded to JSON.'); | 161 'Object containing handles cannot be encoded to JSON.'); |
164 } | 162 } |
165 } | 163 } |
166 | 164 |
167 | 165 |
168 | |
169 | |
170 class _NetworkServiceCreateWebSocketParams extends bindings.Struct { | 166 class _NetworkServiceCreateWebSocketParams extends bindings.Struct { |
171 static const List<bindings.StructDataHeader> kVersions = const [ | 167 static const List<bindings.StructDataHeader> kVersions = const [ |
172 const bindings.StructDataHeader(16, 0) | 168 const bindings.StructDataHeader(16, 0) |
173 ]; | 169 ]; |
174 Object socket = null; | 170 Object socket = null; |
175 | 171 |
176 _NetworkServiceCreateWebSocketParams() : super(kVersions.last.size); | 172 _NetworkServiceCreateWebSocketParams() : super(kVersions.last.size); |
177 | 173 |
178 static _NetworkServiceCreateWebSocketParams deserialize(bindings.Message messa
ge) { | 174 static _NetworkServiceCreateWebSocketParams deserialize(bindings.Message messa
ge) { |
179 var decoder = new bindings.Decoder(message); | 175 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 "socket: $socket" ")"; | 227 "socket: $socket" ")"; |
232 } | 228 } |
233 | 229 |
234 Map toJson() { | 230 Map toJson() { |
235 throw new bindings.MojoCodecError( | 231 throw new bindings.MojoCodecError( |
236 'Object containing handles cannot be encoded to JSON.'); | 232 'Object containing handles cannot be encoded to JSON.'); |
237 } | 233 } |
238 } | 234 } |
239 | 235 |
240 | 236 |
241 | |
242 | |
243 class _NetworkServiceCreateTcpBoundSocketParams extends bindings.Struct { | 237 class _NetworkServiceCreateTcpBoundSocketParams extends bindings.Struct { |
244 static const List<bindings.StructDataHeader> kVersions = const [ | 238 static const List<bindings.StructDataHeader> kVersions = const [ |
245 const bindings.StructDataHeader(24, 0) | 239 const bindings.StructDataHeader(24, 0) |
246 ]; | 240 ]; |
247 net_address_mojom.NetAddress localAddress = null; | 241 net_address_mojom.NetAddress localAddress = null; |
248 Object boundSocket = null; | 242 Object boundSocket = null; |
249 | 243 |
250 _NetworkServiceCreateTcpBoundSocketParams() : super(kVersions.last.size); | 244 _NetworkServiceCreateTcpBoundSocketParams() : super(kVersions.last.size); |
251 | 245 |
252 static _NetworkServiceCreateTcpBoundSocketParams deserialize(bindings.Message
message) { | 246 static _NetworkServiceCreateTcpBoundSocketParams deserialize(bindings.Message
message) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 "boundSocket: $boundSocket" ")"; | 312 "boundSocket: $boundSocket" ")"; |
319 } | 313 } |
320 | 314 |
321 Map toJson() { | 315 Map toJson() { |
322 throw new bindings.MojoCodecError( | 316 throw new bindings.MojoCodecError( |
323 'Object containing handles cannot be encoded to JSON.'); | 317 'Object containing handles cannot be encoded to JSON.'); |
324 } | 318 } |
325 } | 319 } |
326 | 320 |
327 | 321 |
328 | |
329 | |
330 class NetworkServiceCreateTcpBoundSocketResponseParams extends bindings.Struct { | 322 class NetworkServiceCreateTcpBoundSocketResponseParams extends bindings.Struct { |
331 static const List<bindings.StructDataHeader> kVersions = const [ | 323 static const List<bindings.StructDataHeader> kVersions = const [ |
332 const bindings.StructDataHeader(24, 0) | 324 const bindings.StructDataHeader(24, 0) |
333 ]; | 325 ]; |
334 network_error_mojom.NetworkError result = null; | 326 network_error_mojom.NetworkError result = null; |
335 net_address_mojom.NetAddress boundTo = null; | 327 net_address_mojom.NetAddress boundTo = null; |
336 | 328 |
337 NetworkServiceCreateTcpBoundSocketResponseParams() : super(kVersions.last.size
); | 329 NetworkServiceCreateTcpBoundSocketResponseParams() : super(kVersions.last.size
); |
338 | 330 |
339 static NetworkServiceCreateTcpBoundSocketResponseParams deserialize(bindings.M
essage message) { | 331 static NetworkServiceCreateTcpBoundSocketResponseParams deserialize(bindings.M
essage message) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 | 400 |
409 Map toJson() { | 401 Map toJson() { |
410 Map map = new Map(); | 402 Map map = new Map(); |
411 map["result"] = result; | 403 map["result"] = result; |
412 map["boundTo"] = boundTo; | 404 map["boundTo"] = boundTo; |
413 return map; | 405 return map; |
414 } | 406 } |
415 } | 407 } |
416 | 408 |
417 | 409 |
418 | |
419 | |
420 class _NetworkServiceCreateTcpConnectedSocketParams extends bindings.Struct { | 410 class _NetworkServiceCreateTcpConnectedSocketParams extends bindings.Struct { |
421 static const List<bindings.StructDataHeader> kVersions = const [ | 411 static const List<bindings.StructDataHeader> kVersions = const [ |
422 const bindings.StructDataHeader(32, 0) | 412 const bindings.StructDataHeader(32, 0) |
423 ]; | 413 ]; |
424 net_address_mojom.NetAddress remoteAddress = null; | 414 net_address_mojom.NetAddress remoteAddress = null; |
425 core.MojoDataPipeConsumer sendStream = null; | 415 core.MojoDataPipeConsumer sendStream = null; |
426 core.MojoDataPipeProducer receiveStream = null; | 416 core.MojoDataPipeProducer receiveStream = null; |
427 Object clientSocket = null; | 417 Object clientSocket = null; |
428 | 418 |
429 _NetworkServiceCreateTcpConnectedSocketParams() : super(kVersions.last.size); | 419 _NetworkServiceCreateTcpConnectedSocketParams() : super(kVersions.last.size); |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 "clientSocket: $clientSocket" ")"; | 511 "clientSocket: $clientSocket" ")"; |
522 } | 512 } |
523 | 513 |
524 Map toJson() { | 514 Map toJson() { |
525 throw new bindings.MojoCodecError( | 515 throw new bindings.MojoCodecError( |
526 'Object containing handles cannot be encoded to JSON.'); | 516 'Object containing handles cannot be encoded to JSON.'); |
527 } | 517 } |
528 } | 518 } |
529 | 519 |
530 | 520 |
531 | |
532 | |
533 class NetworkServiceCreateTcpConnectedSocketResponseParams extends bindings.Stru
ct { | 521 class NetworkServiceCreateTcpConnectedSocketResponseParams extends bindings.Stru
ct { |
534 static const List<bindings.StructDataHeader> kVersions = const [ | 522 static const List<bindings.StructDataHeader> kVersions = const [ |
535 const bindings.StructDataHeader(24, 0) | 523 const bindings.StructDataHeader(24, 0) |
536 ]; | 524 ]; |
537 network_error_mojom.NetworkError result = null; | 525 network_error_mojom.NetworkError result = null; |
538 net_address_mojom.NetAddress localAddress = null; | 526 net_address_mojom.NetAddress localAddress = null; |
539 | 527 |
540 NetworkServiceCreateTcpConnectedSocketResponseParams() : super(kVersions.last.
size); | 528 NetworkServiceCreateTcpConnectedSocketResponseParams() : super(kVersions.last.
size); |
541 | 529 |
542 static NetworkServiceCreateTcpConnectedSocketResponseParams deserialize(bindin
gs.Message message) { | 530 static NetworkServiceCreateTcpConnectedSocketResponseParams deserialize(bindin
gs.Message message) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 | 599 |
612 Map toJson() { | 600 Map toJson() { |
613 Map map = new Map(); | 601 Map map = new Map(); |
614 map["result"] = result; | 602 map["result"] = result; |
615 map["localAddress"] = localAddress; | 603 map["localAddress"] = localAddress; |
616 return map; | 604 return map; |
617 } | 605 } |
618 } | 606 } |
619 | 607 |
620 | 608 |
621 | |
622 | |
623 class _NetworkServiceCreateUdpSocketParams extends bindings.Struct { | 609 class _NetworkServiceCreateUdpSocketParams extends bindings.Struct { |
624 static const List<bindings.StructDataHeader> kVersions = const [ | 610 static const List<bindings.StructDataHeader> kVersions = const [ |
625 const bindings.StructDataHeader(16, 0) | 611 const bindings.StructDataHeader(16, 0) |
626 ]; | 612 ]; |
627 Object socket = null; | 613 Object socket = null; |
628 | 614 |
629 _NetworkServiceCreateUdpSocketParams() : super(kVersions.last.size); | 615 _NetworkServiceCreateUdpSocketParams() : super(kVersions.last.size); |
630 | 616 |
631 static _NetworkServiceCreateUdpSocketParams deserialize(bindings.Message messa
ge) { | 617 static _NetworkServiceCreateUdpSocketParams deserialize(bindings.Message messa
ge) { |
632 var decoder = new bindings.Decoder(message); | 618 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 "socket: $socket" ")"; | 670 "socket: $socket" ")"; |
685 } | 671 } |
686 | 672 |
687 Map toJson() { | 673 Map toJson() { |
688 throw new bindings.MojoCodecError( | 674 throw new bindings.MojoCodecError( |
689 'Object containing handles cannot be encoded to JSON.'); | 675 'Object containing handles cannot be encoded to JSON.'); |
690 } | 676 } |
691 } | 677 } |
692 | 678 |
693 | 679 |
694 | |
695 | |
696 class _NetworkServiceCreateHttpServerParams extends bindings.Struct { | 680 class _NetworkServiceCreateHttpServerParams extends bindings.Struct { |
697 static const List<bindings.StructDataHeader> kVersions = const [ | 681 static const List<bindings.StructDataHeader> kVersions = const [ |
698 const bindings.StructDataHeader(24, 0) | 682 const bindings.StructDataHeader(24, 0) |
699 ]; | 683 ]; |
700 net_address_mojom.NetAddress localAddress = null; | 684 net_address_mojom.NetAddress localAddress = null; |
701 Object delegate = null; | 685 Object delegate = null; |
702 | 686 |
703 _NetworkServiceCreateHttpServerParams() : super(kVersions.last.size); | 687 _NetworkServiceCreateHttpServerParams() : super(kVersions.last.size); |
704 | 688 |
705 static _NetworkServiceCreateHttpServerParams deserialize(bindings.Message mess
age) { | 689 static _NetworkServiceCreateHttpServerParams deserialize(bindings.Message mess
age) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 "delegate: $delegate" ")"; | 755 "delegate: $delegate" ")"; |
772 } | 756 } |
773 | 757 |
774 Map toJson() { | 758 Map toJson() { |
775 throw new bindings.MojoCodecError( | 759 throw new bindings.MojoCodecError( |
776 'Object containing handles cannot be encoded to JSON.'); | 760 'Object containing handles cannot be encoded to JSON.'); |
777 } | 761 } |
778 } | 762 } |
779 | 763 |
780 | 764 |
781 | |
782 | |
783 class NetworkServiceCreateHttpServerResponseParams extends bindings.Struct { | 765 class NetworkServiceCreateHttpServerResponseParams extends bindings.Struct { |
784 static const List<bindings.StructDataHeader> kVersions = const [ | 766 static const List<bindings.StructDataHeader> kVersions = const [ |
785 const bindings.StructDataHeader(24, 0) | 767 const bindings.StructDataHeader(24, 0) |
786 ]; | 768 ]; |
787 network_error_mojom.NetworkError result = null; | 769 network_error_mojom.NetworkError result = null; |
788 net_address_mojom.NetAddress boundTo = null; | 770 net_address_mojom.NetAddress boundTo = null; |
789 | 771 |
790 NetworkServiceCreateHttpServerResponseParams() : super(kVersions.last.size); | 772 NetworkServiceCreateHttpServerResponseParams() : super(kVersions.last.size); |
791 | 773 |
792 static NetworkServiceCreateHttpServerResponseParams deserialize(bindings.Messa
ge message) { | 774 static NetworkServiceCreateHttpServerResponseParams deserialize(bindings.Messa
ge message) { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 | 843 |
862 Map toJson() { | 844 Map toJson() { |
863 Map map = new Map(); | 845 Map map = new Map(); |
864 map["result"] = result; | 846 map["result"] = result; |
865 map["boundTo"] = boundTo; | 847 map["boundTo"] = boundTo; |
866 return map; | 848 return map; |
867 } | 849 } |
868 } | 850 } |
869 | 851 |
870 | 852 |
871 | |
872 | |
873 class _NetworkServiceRegisterUrlLoaderInterceptorParams extends bindings.Struct
{ | 853 class _NetworkServiceRegisterUrlLoaderInterceptorParams extends bindings.Struct
{ |
874 static const List<bindings.StructDataHeader> kVersions = const [ | 854 static const List<bindings.StructDataHeader> kVersions = const [ |
875 const bindings.StructDataHeader(16, 0) | 855 const bindings.StructDataHeader(16, 0) |
876 ]; | 856 ]; |
877 Object factory = null; | 857 Object factory = null; |
878 | 858 |
879 _NetworkServiceRegisterUrlLoaderInterceptorParams() : super(kVersions.last.siz
e); | 859 _NetworkServiceRegisterUrlLoaderInterceptorParams() : super(kVersions.last.siz
e); |
880 | 860 |
881 static _NetworkServiceRegisterUrlLoaderInterceptorParams deserialize(bindings.
Message message) { | 861 static _NetworkServiceRegisterUrlLoaderInterceptorParams deserialize(bindings.
Message message) { |
882 var decoder = new bindings.Decoder(message); | 862 var decoder = new bindings.Decoder(message); |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
934 "factory: $factory" ")"; | 914 "factory: $factory" ")"; |
935 } | 915 } |
936 | 916 |
937 Map toJson() { | 917 Map toJson() { |
938 throw new bindings.MojoCodecError( | 918 throw new bindings.MojoCodecError( |
939 'Object containing handles cannot be encoded to JSON.'); | 919 'Object containing handles cannot be encoded to JSON.'); |
940 } | 920 } |
941 } | 921 } |
942 | 922 |
943 | 923 |
944 | |
945 | |
946 class _NetworkServiceCreateHostResolverParams extends bindings.Struct { | 924 class _NetworkServiceCreateHostResolverParams extends bindings.Struct { |
947 static const List<bindings.StructDataHeader> kVersions = const [ | 925 static const List<bindings.StructDataHeader> kVersions = const [ |
948 const bindings.StructDataHeader(16, 0) | 926 const bindings.StructDataHeader(16, 0) |
949 ]; | 927 ]; |
950 Object hostResolver = null; | 928 Object hostResolver = null; |
951 | 929 |
952 _NetworkServiceCreateHostResolverParams() : super(kVersions.last.size); | 930 _NetworkServiceCreateHostResolverParams() : super(kVersions.last.size); |
953 | 931 |
954 static _NetworkServiceCreateHostResolverParams deserialize(bindings.Message me
ssage) { | 932 static _NetworkServiceCreateHostResolverParams deserialize(bindings.Message me
ssage) { |
955 var decoder = new bindings.Decoder(message); | 933 var decoder = new bindings.Decoder(message); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1006 return "_NetworkServiceCreateHostResolverParams(" | 984 return "_NetworkServiceCreateHostResolverParams(" |
1007 "hostResolver: $hostResolver" ")"; | 985 "hostResolver: $hostResolver" ")"; |
1008 } | 986 } |
1009 | 987 |
1010 Map toJson() { | 988 Map toJson() { |
1011 throw new bindings.MojoCodecError( | 989 throw new bindings.MojoCodecError( |
1012 'Object containing handles cannot be encoded to JSON.'); | 990 'Object containing handles cannot be encoded to JSON.'); |
1013 } | 991 } |
1014 } | 992 } |
1015 | 993 |
1016 | |
1017 | |
1018 | |
1019 const int _NetworkService_createUrlLoaderName = 0; | 994 const int _NetworkService_createUrlLoaderName = 0; |
1020 const int _NetworkService_getCookieStoreName = 1; | 995 const int _NetworkService_getCookieStoreName = 1; |
1021 const int _NetworkService_createWebSocketName = 2; | 996 const int _NetworkService_createWebSocketName = 2; |
1022 const int _NetworkService_createTcpBoundSocketName = 3; | 997 const int _NetworkService_createTcpBoundSocketName = 3; |
1023 const int _NetworkService_createTcpConnectedSocketName = 4; | 998 const int _NetworkService_createTcpConnectedSocketName = 4; |
1024 const int _NetworkService_createUdpSocketName = 5; | 999 const int _NetworkService_createUdpSocketName = 5; |
1025 const int _NetworkService_createHttpServerName = 6; | 1000 const int _NetworkService_createHttpServerName = 6; |
1026 const int _NetworkService_registerUrlLoaderInterceptorName = 7; | 1001 const int _NetworkService_registerUrlLoaderInterceptorName = 7; |
1027 const int _NetworkService_createHostResolverName = 8; | 1002 const int _NetworkService_createHostResolverName = 8; |
1028 | 1003 |
1029 | |
1030 | |
1031 class _NetworkServiceServiceDescription implements service_describer.ServiceDesc
ription { | 1004 class _NetworkServiceServiceDescription implements service_describer.ServiceDesc
ription { |
1032 dynamic getTopLevelInterface([Function responseFactory]) => | 1005 dynamic getTopLevelInterface([Function responseFactory]) => |
1033 responseFactory(null); | 1006 responseFactory(null); |
1034 | 1007 |
1035 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 1008 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
1036 responseFactory(null); | 1009 responseFactory(null); |
1037 | 1010 |
1038 dynamic getAllTypeDefinitions([Function responseFactory]) => | 1011 dynamic getAllTypeDefinitions([Function responseFactory]) => |
1039 responseFactory(null); | 1012 responseFactory(null); |
1040 } | 1013 } |
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 static service_describer.ServiceDescription get serviceDescription { | 1438 static service_describer.ServiceDescription get serviceDescription { |
1466 if (_cachedServiceDescription == null) { | 1439 if (_cachedServiceDescription == null) { |
1467 _cachedServiceDescription = new _NetworkServiceServiceDescription(); | 1440 _cachedServiceDescription = new _NetworkServiceServiceDescription(); |
1468 } | 1441 } |
1469 return _cachedServiceDescription; | 1442 return _cachedServiceDescription; |
1470 } | 1443 } |
1471 } | 1444 } |
1472 | 1445 |
1473 | 1446 |
1474 | 1447 |
OLD | NEW |