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 http_connection_mojom; | 5 library http_connection_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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 Map toJson() { | 80 Map toJson() { |
81 Map map = new Map(); | 81 Map map = new Map(); |
82 map["size"] = size; | 82 map["size"] = size; |
83 return map; | 83 return map; |
84 } | 84 } |
85 } | 85 } |
86 | 86 |
87 | 87 |
88 | |
89 | |
90 class HttpConnectionSetSendBufferSizeResponseParams extends bindings.Struct { | 88 class HttpConnectionSetSendBufferSizeResponseParams extends bindings.Struct { |
91 static const List<bindings.StructDataHeader> kVersions = const [ | 89 static const List<bindings.StructDataHeader> kVersions = const [ |
92 const bindings.StructDataHeader(16, 0) | 90 const bindings.StructDataHeader(16, 0) |
93 ]; | 91 ]; |
94 network_error_mojom.NetworkError result = null; | 92 network_error_mojom.NetworkError result = null; |
95 | 93 |
96 HttpConnectionSetSendBufferSizeResponseParams() : super(kVersions.last.size); | 94 HttpConnectionSetSendBufferSizeResponseParams() : super(kVersions.last.size); |
97 | 95 |
98 static HttpConnectionSetSendBufferSizeResponseParams deserialize(bindings.Mess
age message) { | 96 static HttpConnectionSetSendBufferSizeResponseParams deserialize(bindings.Mess
age message) { |
99 var decoder = new bindings.Decoder(message); | 97 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 151 } |
154 | 152 |
155 Map toJson() { | 153 Map toJson() { |
156 Map map = new Map(); | 154 Map map = new Map(); |
157 map["result"] = result; | 155 map["result"] = result; |
158 return map; | 156 return map; |
159 } | 157 } |
160 } | 158 } |
161 | 159 |
162 | 160 |
163 | |
164 | |
165 class _HttpConnectionSetReceiveBufferSizeParams extends bindings.Struct { | 161 class _HttpConnectionSetReceiveBufferSizeParams extends bindings.Struct { |
166 static const List<bindings.StructDataHeader> kVersions = const [ | 162 static const List<bindings.StructDataHeader> kVersions = const [ |
167 const bindings.StructDataHeader(16, 0) | 163 const bindings.StructDataHeader(16, 0) |
168 ]; | 164 ]; |
169 int size = 0; | 165 int size = 0; |
170 | 166 |
171 _HttpConnectionSetReceiveBufferSizeParams() : super(kVersions.last.size); | 167 _HttpConnectionSetReceiveBufferSizeParams() : super(kVersions.last.size); |
172 | 168 |
173 static _HttpConnectionSetReceiveBufferSizeParams deserialize(bindings.Message
message) { | 169 static _HttpConnectionSetReceiveBufferSizeParams deserialize(bindings.Message
message) { |
174 var decoder = new bindings.Decoder(message); | 170 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 } | 223 } |
228 | 224 |
229 Map toJson() { | 225 Map toJson() { |
230 Map map = new Map(); | 226 Map map = new Map(); |
231 map["size"] = size; | 227 map["size"] = size; |
232 return map; | 228 return map; |
233 } | 229 } |
234 } | 230 } |
235 | 231 |
236 | 232 |
237 | |
238 | |
239 class HttpConnectionSetReceiveBufferSizeResponseParams extends bindings.Struct { | 233 class HttpConnectionSetReceiveBufferSizeResponseParams extends bindings.Struct { |
240 static const List<bindings.StructDataHeader> kVersions = const [ | 234 static const List<bindings.StructDataHeader> kVersions = const [ |
241 const bindings.StructDataHeader(16, 0) | 235 const bindings.StructDataHeader(16, 0) |
242 ]; | 236 ]; |
243 network_error_mojom.NetworkError result = null; | 237 network_error_mojom.NetworkError result = null; |
244 | 238 |
245 HttpConnectionSetReceiveBufferSizeResponseParams() : super(kVersions.last.size
); | 239 HttpConnectionSetReceiveBufferSizeResponseParams() : super(kVersions.last.size
); |
246 | 240 |
247 static HttpConnectionSetReceiveBufferSizeResponseParams deserialize(bindings.M
essage message) { | 241 static HttpConnectionSetReceiveBufferSizeResponseParams deserialize(bindings.M
essage message) { |
248 var decoder = new bindings.Decoder(message); | 242 var decoder = new bindings.Decoder(message); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 } | 296 } |
303 | 297 |
304 Map toJson() { | 298 Map toJson() { |
305 Map map = new Map(); | 299 Map map = new Map(); |
306 map["result"] = result; | 300 map["result"] = result; |
307 return map; | 301 return map; |
308 } | 302 } |
309 } | 303 } |
310 | 304 |
311 | 305 |
312 | |
313 | |
314 class _HttpConnectionDelegateOnReceivedRequestParams extends bindings.Struct { | 306 class _HttpConnectionDelegateOnReceivedRequestParams extends bindings.Struct { |
315 static const List<bindings.StructDataHeader> kVersions = const [ | 307 static const List<bindings.StructDataHeader> kVersions = const [ |
316 const bindings.StructDataHeader(16, 0) | 308 const bindings.StructDataHeader(16, 0) |
317 ]; | 309 ]; |
318 http_message_mojom.HttpRequest request = null; | 310 http_message_mojom.HttpRequest request = null; |
319 | 311 |
320 _HttpConnectionDelegateOnReceivedRequestParams() : super(kVersions.last.size); | 312 _HttpConnectionDelegateOnReceivedRequestParams() : super(kVersions.last.size); |
321 | 313 |
322 static _HttpConnectionDelegateOnReceivedRequestParams deserialize(bindings.Mes
sage message) { | 314 static _HttpConnectionDelegateOnReceivedRequestParams deserialize(bindings.Mes
sage message) { |
323 var decoder = new bindings.Decoder(message); | 315 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 "request: $request" ")"; | 368 "request: $request" ")"; |
377 } | 369 } |
378 | 370 |
379 Map toJson() { | 371 Map toJson() { |
380 throw new bindings.MojoCodecError( | 372 throw new bindings.MojoCodecError( |
381 'Object containing handles cannot be encoded to JSON.'); | 373 'Object containing handles cannot be encoded to JSON.'); |
382 } | 374 } |
383 } | 375 } |
384 | 376 |
385 | 377 |
386 | |
387 | |
388 class HttpConnectionDelegateOnReceivedRequestResponseParams extends bindings.Str
uct { | 378 class HttpConnectionDelegateOnReceivedRequestResponseParams extends bindings.Str
uct { |
389 static const List<bindings.StructDataHeader> kVersions = const [ | 379 static const List<bindings.StructDataHeader> kVersions = const [ |
390 const bindings.StructDataHeader(16, 0) | 380 const bindings.StructDataHeader(16, 0) |
391 ]; | 381 ]; |
392 http_message_mojom.HttpResponse response = null; | 382 http_message_mojom.HttpResponse response = null; |
393 | 383 |
394 HttpConnectionDelegateOnReceivedRequestResponseParams() : super(kVersions.last
.size); | 384 HttpConnectionDelegateOnReceivedRequestResponseParams() : super(kVersions.last
.size); |
395 | 385 |
396 static HttpConnectionDelegateOnReceivedRequestResponseParams deserialize(bindi
ngs.Message message) { | 386 static HttpConnectionDelegateOnReceivedRequestResponseParams deserialize(bindi
ngs.Message message) { |
397 var decoder = new bindings.Decoder(message); | 387 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 "response: $response" ")"; | 440 "response: $response" ")"; |
451 } | 441 } |
452 | 442 |
453 Map toJson() { | 443 Map toJson() { |
454 throw new bindings.MojoCodecError( | 444 throw new bindings.MojoCodecError( |
455 'Object containing handles cannot be encoded to JSON.'); | 445 'Object containing handles cannot be encoded to JSON.'); |
456 } | 446 } |
457 } | 447 } |
458 | 448 |
459 | 449 |
460 | |
461 | |
462 class _HttpConnectionDelegateOnReceivedWebSocketRequestParams extends bindings.S
truct { | 450 class _HttpConnectionDelegateOnReceivedWebSocketRequestParams extends bindings.S
truct { |
463 static const List<bindings.StructDataHeader> kVersions = const [ | 451 static const List<bindings.StructDataHeader> kVersions = const [ |
464 const bindings.StructDataHeader(16, 0) | 452 const bindings.StructDataHeader(16, 0) |
465 ]; | 453 ]; |
466 http_message_mojom.HttpRequest request = null; | 454 http_message_mojom.HttpRequest request = null; |
467 | 455 |
468 _HttpConnectionDelegateOnReceivedWebSocketRequestParams() : super(kVersions.la
st.size); | 456 _HttpConnectionDelegateOnReceivedWebSocketRequestParams() : super(kVersions.la
st.size); |
469 | 457 |
470 static _HttpConnectionDelegateOnReceivedWebSocketRequestParams deserialize(bin
dings.Message message) { | 458 static _HttpConnectionDelegateOnReceivedWebSocketRequestParams deserialize(bin
dings.Message message) { |
471 var decoder = new bindings.Decoder(message); | 459 var decoder = new bindings.Decoder(message); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 "request: $request" ")"; | 512 "request: $request" ")"; |
525 } | 513 } |
526 | 514 |
527 Map toJson() { | 515 Map toJson() { |
528 throw new bindings.MojoCodecError( | 516 throw new bindings.MojoCodecError( |
529 'Object containing handles cannot be encoded to JSON.'); | 517 'Object containing handles cannot be encoded to JSON.'); |
530 } | 518 } |
531 } | 519 } |
532 | 520 |
533 | 521 |
534 | |
535 | |
536 class HttpConnectionDelegateOnReceivedWebSocketRequestResponseParams extends bin
dings.Struct { | 522 class HttpConnectionDelegateOnReceivedWebSocketRequestResponseParams extends bin
dings.Struct { |
537 static const List<bindings.StructDataHeader> kVersions = const [ | 523 static const List<bindings.StructDataHeader> kVersions = const [ |
538 const bindings.StructDataHeader(24, 0) | 524 const bindings.StructDataHeader(24, 0) |
539 ]; | 525 ]; |
540 Object webSocket = null; | 526 Object webSocket = null; |
541 core.MojoDataPipeConsumer sendStream = null; | 527 core.MojoDataPipeConsumer sendStream = null; |
542 Object client = null; | 528 Object client = null; |
543 | 529 |
544 HttpConnectionDelegateOnReceivedWebSocketRequestResponseParams() : super(kVers
ions.last.size); | 530 HttpConnectionDelegateOnReceivedWebSocketRequestResponseParams() : super(kVers
ions.last.size); |
545 | 531 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 "sendStream: $sendStream" ", " | 608 "sendStream: $sendStream" ", " |
623 "client: $client" ")"; | 609 "client: $client" ")"; |
624 } | 610 } |
625 | 611 |
626 Map toJson() { | 612 Map toJson() { |
627 throw new bindings.MojoCodecError( | 613 throw new bindings.MojoCodecError( |
628 'Object containing handles cannot be encoded to JSON.'); | 614 'Object containing handles cannot be encoded to JSON.'); |
629 } | 615 } |
630 } | 616 } |
631 | 617 |
632 | |
633 | |
634 | |
635 const int _HttpConnection_setSendBufferSizeName = 0; | 618 const int _HttpConnection_setSendBufferSizeName = 0; |
636 const int _HttpConnection_setReceiveBufferSizeName = 1; | 619 const int _HttpConnection_setReceiveBufferSizeName = 1; |
637 | 620 |
638 | |
639 | |
640 class _HttpConnectionServiceDescription implements service_describer.ServiceDesc
ription { | 621 class _HttpConnectionServiceDescription implements service_describer.ServiceDesc
ription { |
641 dynamic getTopLevelInterface([Function responseFactory]) => | 622 dynamic getTopLevelInterface([Function responseFactory]) => |
642 responseFactory(null); | 623 responseFactory(null); |
643 | 624 |
644 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 625 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
645 responseFactory(null); | 626 responseFactory(null); |
646 | 627 |
647 dynamic getAllTypeDefinitions([Function responseFactory]) => | 628 dynamic getAllTypeDefinitions([Function responseFactory]) => |
648 responseFactory(null); | 629 responseFactory(null); |
649 } | 630 } |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 if (_cachedServiceDescription == null) { | 901 if (_cachedServiceDescription == null) { |
921 _cachedServiceDescription = new _HttpConnectionServiceDescription(); | 902 _cachedServiceDescription = new _HttpConnectionServiceDescription(); |
922 } | 903 } |
923 return _cachedServiceDescription; | 904 return _cachedServiceDescription; |
924 } | 905 } |
925 } | 906 } |
926 | 907 |
927 const int _HttpConnectionDelegate_onReceivedRequestName = 0; | 908 const int _HttpConnectionDelegate_onReceivedRequestName = 0; |
928 const int _HttpConnectionDelegate_onReceivedWebSocketRequestName = 1; | 909 const int _HttpConnectionDelegate_onReceivedWebSocketRequestName = 1; |
929 | 910 |
930 | |
931 | |
932 class _HttpConnectionDelegateServiceDescription implements service_describer.Ser
viceDescription { | 911 class _HttpConnectionDelegateServiceDescription implements service_describer.Ser
viceDescription { |
933 dynamic getTopLevelInterface([Function responseFactory]) => | 912 dynamic getTopLevelInterface([Function responseFactory]) => |
934 responseFactory(null); | 913 responseFactory(null); |
935 | 914 |
936 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => | 915 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => |
937 responseFactory(null); | 916 responseFactory(null); |
938 | 917 |
939 dynamic getAllTypeDefinitions([Function responseFactory]) => | 918 dynamic getAllTypeDefinitions([Function responseFactory]) => |
940 responseFactory(null); | 919 responseFactory(null); |
941 } | 920 } |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1213 static service_describer.ServiceDescription get serviceDescription { | 1192 static service_describer.ServiceDescription get serviceDescription { |
1214 if (_cachedServiceDescription == null) { | 1193 if (_cachedServiceDescription == null) { |
1215 _cachedServiceDescription = new _HttpConnectionDelegateServiceDescription(
); | 1194 _cachedServiceDescription = new _HttpConnectionDelegateServiceDescription(
); |
1216 } | 1195 } |
1217 return _cachedServiceDescription; | 1196 return _cachedServiceDescription; |
1218 } | 1197 } |
1219 } | 1198 } |
1220 | 1199 |
1221 | 1200 |
1222 | 1201 |
OLD | NEW |