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 url_loader_interceptor_mojom; | 5 library url_loader_interceptor_mojom; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 | 8 |
9 import 'package:mojo/bindings.dart' as bindings; | 9 import 'package:mojo/bindings.dart' as bindings; |
10 import 'package:mojo/core.dart' as core; | 10 import 'package:mojo/core.dart' as core; |
| 11 import 'package:mojo/mojo/mojom_types.mojom.dart' as mojom_types; |
| 12 import 'package:mojo/mojo/service_describer.mojom.dart' as service_describer; |
11 import 'package:mojo/mojo/url_request.mojom.dart' as url_request_mojom; | 13 import 'package:mojo/mojo/url_request.mojom.dart' as url_request_mojom; |
12 import 'package:mojo/mojo/url_response.mojom.dart' as url_response_mojom; | 14 import 'package:mojo/mojo/url_response.mojom.dart' as url_response_mojom; |
13 | 15 |
14 | 16 |
15 | 17 |
16 class UrlLoaderInterceptorResponse extends bindings.Struct { | 18 class UrlLoaderInterceptorResponse extends bindings.Struct { |
17 static const List<bindings.StructDataHeader> kVersions = const [ | 19 static const List<bindings.StructDataHeader> kVersions = const [ |
18 const bindings.StructDataHeader(24, 0) | 20 const bindings.StructDataHeader(24, 0) |
19 ]; | 21 ]; |
20 url_request_mojom.UrlRequest request = null; | 22 url_request_mojom.UrlRequest request = null; |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 "request: $request" ", " | 83 "request: $request" ", " |
82 "response: $response" ")"; | 84 "response: $response" ")"; |
83 } | 85 } |
84 | 86 |
85 Map toJson() { | 87 Map toJson() { |
86 throw new bindings.MojoCodecError( | 88 throw new bindings.MojoCodecError( |
87 'Object containing handles cannot be encoded to JSON.'); | 89 'Object containing handles cannot be encoded to JSON.'); |
88 } | 90 } |
89 } | 91 } |
90 | 92 |
| 93 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptorResponse__()
{ |
| 94 return new mojom_types.MojomStruct() |
| 95 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorResponse') |
| 96 ..fields = <mojom_types.StructField>[ |
| 97 new mojom_types.StructField() |
| 98 ..declData = (new mojom_types.DeclarationData()..shortName = 'Request') |
| 99 ..type = (new mojom_types.Type() |
| 100 ..typeReference = (new mojom_types.TypeReference() |
| 101 ..nullable = true |
| 102 |
| 103 |
| 104 ..identifier = '_url_request_URLRequest__' |
| 105 ..typeKey = '_url_request_URLRequest__' |
| 106 )), |
| 107 |
| 108 new mojom_types.StructField() |
| 109 ..declData = (new mojom_types.DeclarationData()..shortName = 'Response') |
| 110 ..type = (new mojom_types.Type() |
| 111 ..typeReference = (new mojom_types.TypeReference() |
| 112 ..nullable = true |
| 113 |
| 114 |
| 115 ..identifier = '_url_response_URLResponse__' |
| 116 ..typeKey = '_url_response_URLResponse__' |
| 117 )), |
| 118 ]; |
| 119 } |
| 120 |
91 | 121 |
92 class UrlLoaderInterceptorFactoryCreateParams extends bindings.Struct { | 122 class UrlLoaderInterceptorFactoryCreateParams extends bindings.Struct { |
93 static const List<bindings.StructDataHeader> kVersions = const [ | 123 static const List<bindings.StructDataHeader> kVersions = const [ |
94 const bindings.StructDataHeader(16, 0) | 124 const bindings.StructDataHeader(16, 0) |
95 ]; | 125 ]; |
96 Object interceptor = null; | 126 Object interceptor = null; |
97 | 127 |
98 UrlLoaderInterceptorFactoryCreateParams() : super(kVersions.last.size); | 128 UrlLoaderInterceptorFactoryCreateParams() : super(kVersions.last.size); |
99 | 129 |
100 static UrlLoaderInterceptorFactoryCreateParams deserialize(bindings.Message me
ssage) { | 130 static UrlLoaderInterceptorFactoryCreateParams deserialize(bindings.Message me
ssage) { |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 return "UrlLoaderInterceptorFactoryCreateParams(" | 177 return "UrlLoaderInterceptorFactoryCreateParams(" |
148 "interceptor: $interceptor" ")"; | 178 "interceptor: $interceptor" ")"; |
149 } | 179 } |
150 | 180 |
151 Map toJson() { | 181 Map toJson() { |
152 throw new bindings.MojoCodecError( | 182 throw new bindings.MojoCodecError( |
153 'Object containing handles cannot be encoded to JSON.'); | 183 'Object containing handles cannot be encoded to JSON.'); |
154 } | 184 } |
155 } | 185 } |
156 | 186 |
| 187 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptorFactory_Crea
te_Params__() { |
| 188 return new mojom_types.MojomStruct() |
| 189 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorFactoryCreateParams') |
| 190 ..fields = <mojom_types.StructField>[ |
| 191 new mojom_types.StructField() |
| 192 ..declData = (new mojom_types.DeclarationData()..shortName = 'Intercepto
r') |
| 193 ..type = (new mojom_types.Type() |
| 194 ..typeReference = (new mojom_types.TypeReference() |
| 195 |
| 196 ..isInterfaceRequest = true |
| 197 ..identifier = '_url_loader_interceptor_URLLoaderInterceptor__' |
| 198 ..typeKey = '_url_loader_interceptor_URLLoaderInterceptor__' |
| 199 )), |
| 200 ]; |
| 201 } |
| 202 |
157 | 203 |
158 class UrlLoaderInterceptorInterceptRequestParams extends bindings.Struct { | 204 class UrlLoaderInterceptorInterceptRequestParams extends bindings.Struct { |
159 static const List<bindings.StructDataHeader> kVersions = const [ | 205 static const List<bindings.StructDataHeader> kVersions = const [ |
160 const bindings.StructDataHeader(16, 0) | 206 const bindings.StructDataHeader(16, 0) |
161 ]; | 207 ]; |
162 url_request_mojom.UrlRequest request = null; | 208 url_request_mojom.UrlRequest request = null; |
163 | 209 |
164 UrlLoaderInterceptorInterceptRequestParams() : super(kVersions.last.size); | 210 UrlLoaderInterceptorInterceptRequestParams() : super(kVersions.last.size); |
165 | 211 |
166 static UrlLoaderInterceptorInterceptRequestParams deserialize(bindings.Message
message) { | 212 static UrlLoaderInterceptorInterceptRequestParams deserialize(bindings.Message
message) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 return "UrlLoaderInterceptorInterceptRequestParams(" | 260 return "UrlLoaderInterceptorInterceptRequestParams(" |
215 "request: $request" ")"; | 261 "request: $request" ")"; |
216 } | 262 } |
217 | 263 |
218 Map toJson() { | 264 Map toJson() { |
219 throw new bindings.MojoCodecError( | 265 throw new bindings.MojoCodecError( |
220 'Object containing handles cannot be encoded to JSON.'); | 266 'Object containing handles cannot be encoded to JSON.'); |
221 } | 267 } |
222 } | 268 } |
223 | 269 |
| 270 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptor_InterceptRe
quest_Params__() { |
| 271 return new mojom_types.MojomStruct() |
| 272 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorInterceptRequestParams') |
| 273 ..fields = <mojom_types.StructField>[ |
| 274 new mojom_types.StructField() |
| 275 ..declData = (new mojom_types.DeclarationData()..shortName = 'Request') |
| 276 ..type = (new mojom_types.Type() |
| 277 ..typeReference = (new mojom_types.TypeReference() |
| 278 |
| 279 ..identifier = '_url_request_URLRequest__' |
| 280 ..typeKey = '_url_request_URLRequest__' |
| 281 )), |
| 282 ]; |
| 283 } |
| 284 |
224 | 285 |
225 class UrlLoaderInterceptorInterceptRequestResponseParams extends bindings.Struct
{ | 286 class UrlLoaderInterceptorInterceptRequestResponseParams extends bindings.Struct
{ |
226 static const List<bindings.StructDataHeader> kVersions = const [ | 287 static const List<bindings.StructDataHeader> kVersions = const [ |
227 const bindings.StructDataHeader(16, 0) | 288 const bindings.StructDataHeader(16, 0) |
228 ]; | 289 ]; |
229 UrlLoaderInterceptorResponse response = null; | 290 UrlLoaderInterceptorResponse response = null; |
230 | 291 |
231 UrlLoaderInterceptorInterceptRequestResponseParams() : super(kVersions.last.si
ze); | 292 UrlLoaderInterceptorInterceptRequestResponseParams() : super(kVersions.last.si
ze); |
232 | 293 |
233 static UrlLoaderInterceptorInterceptRequestResponseParams deserialize(bindings
.Message message) { | 294 static UrlLoaderInterceptorInterceptRequestResponseParams deserialize(bindings
.Message message) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 return "UrlLoaderInterceptorInterceptRequestResponseParams(" | 342 return "UrlLoaderInterceptorInterceptRequestResponseParams(" |
282 "response: $response" ")"; | 343 "response: $response" ")"; |
283 } | 344 } |
284 | 345 |
285 Map toJson() { | 346 Map toJson() { |
286 throw new bindings.MojoCodecError( | 347 throw new bindings.MojoCodecError( |
287 'Object containing handles cannot be encoded to JSON.'); | 348 'Object containing handles cannot be encoded to JSON.'); |
288 } | 349 } |
289 } | 350 } |
290 | 351 |
| 352 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptor_InterceptRe
quest_ResponseParams__() { |
| 353 return new mojom_types.MojomStruct() |
| 354 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorInterceptRequestResponseParams') |
| 355 ..fields = <mojom_types.StructField>[ |
| 356 new mojom_types.StructField() |
| 357 ..declData = (new mojom_types.DeclarationData()..shortName = 'Response') |
| 358 ..type = (new mojom_types.Type() |
| 359 ..typeReference = (new mojom_types.TypeReference() |
| 360 |
| 361 ..identifier = '_url_loader_interceptor_URLLoaderInterceptorResponse__' |
| 362 ..typeKey = '_url_loader_interceptor_URLLoaderInterceptorResponse__' |
| 363 )), |
| 364 ]; |
| 365 } |
| 366 |
291 | 367 |
292 class UrlLoaderInterceptorInterceptFollowRedirectParams extends bindings.Struct
{ | 368 class UrlLoaderInterceptorInterceptFollowRedirectParams extends bindings.Struct
{ |
293 static const List<bindings.StructDataHeader> kVersions = const [ | 369 static const List<bindings.StructDataHeader> kVersions = const [ |
294 const bindings.StructDataHeader(8, 0) | 370 const bindings.StructDataHeader(8, 0) |
295 ]; | 371 ]; |
296 | 372 |
297 UrlLoaderInterceptorInterceptFollowRedirectParams() : super(kVersions.last.siz
e); | 373 UrlLoaderInterceptorInterceptFollowRedirectParams() : super(kVersions.last.siz
e); |
298 | 374 |
299 static UrlLoaderInterceptorInterceptFollowRedirectParams deserialize(bindings.
Message message) { | 375 static UrlLoaderInterceptorInterceptFollowRedirectParams deserialize(bindings.
Message message) { |
300 var decoder = new bindings.Decoder(message); | 376 var decoder = new bindings.Decoder(message); |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 String toString() { | 415 String toString() { |
340 return "UrlLoaderInterceptorInterceptFollowRedirectParams("")"; | 416 return "UrlLoaderInterceptorInterceptFollowRedirectParams("")"; |
341 } | 417 } |
342 | 418 |
343 Map toJson() { | 419 Map toJson() { |
344 Map map = new Map(); | 420 Map map = new Map(); |
345 return map; | 421 return map; |
346 } | 422 } |
347 } | 423 } |
348 | 424 |
| 425 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptor_InterceptFo
llowRedirect_Params__() { |
| 426 return new mojom_types.MojomStruct() |
| 427 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorInterceptFollowRedirectParams') |
| 428 ..fields = <mojom_types.StructField>[]; |
| 429 } |
| 430 |
349 | 431 |
350 class UrlLoaderInterceptorInterceptFollowRedirectResponseParams extends bindings
.Struct { | 432 class UrlLoaderInterceptorInterceptFollowRedirectResponseParams extends bindings
.Struct { |
351 static const List<bindings.StructDataHeader> kVersions = const [ | 433 static const List<bindings.StructDataHeader> kVersions = const [ |
352 const bindings.StructDataHeader(16, 0) | 434 const bindings.StructDataHeader(16, 0) |
353 ]; | 435 ]; |
354 UrlLoaderInterceptorResponse response = null; | 436 UrlLoaderInterceptorResponse response = null; |
355 | 437 |
356 UrlLoaderInterceptorInterceptFollowRedirectResponseParams() : super(kVersions.
last.size); | 438 UrlLoaderInterceptorInterceptFollowRedirectResponseParams() : super(kVersions.
last.size); |
357 | 439 |
358 static UrlLoaderInterceptorInterceptFollowRedirectResponseParams deserialize(b
indings.Message message) { | 440 static UrlLoaderInterceptorInterceptFollowRedirectResponseParams deserialize(b
indings.Message message) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
406 return "UrlLoaderInterceptorInterceptFollowRedirectResponseParams(" | 488 return "UrlLoaderInterceptorInterceptFollowRedirectResponseParams(" |
407 "response: $response" ")"; | 489 "response: $response" ")"; |
408 } | 490 } |
409 | 491 |
410 Map toJson() { | 492 Map toJson() { |
411 throw new bindings.MojoCodecError( | 493 throw new bindings.MojoCodecError( |
412 'Object containing handles cannot be encoded to JSON.'); | 494 'Object containing handles cannot be encoded to JSON.'); |
413 } | 495 } |
414 } | 496 } |
415 | 497 |
| 498 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptor_InterceptFo
llowRedirect_ResponseParams__() { |
| 499 return new mojom_types.MojomStruct() |
| 500 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorInterceptFollowRedirectResponseParams') |
| 501 ..fields = <mojom_types.StructField>[ |
| 502 new mojom_types.StructField() |
| 503 ..declData = (new mojom_types.DeclarationData()..shortName = 'Response') |
| 504 ..type = (new mojom_types.Type() |
| 505 ..typeReference = (new mojom_types.TypeReference() |
| 506 ..nullable = true |
| 507 |
| 508 |
| 509 ..identifier = '_url_loader_interceptor_URLLoaderInterceptorResponse__' |
| 510 ..typeKey = '_url_loader_interceptor_URLLoaderInterceptorResponse__' |
| 511 )), |
| 512 ]; |
| 513 } |
| 514 |
416 | 515 |
417 class UrlLoaderInterceptorInterceptResponseParams extends bindings.Struct { | 516 class UrlLoaderInterceptorInterceptResponseParams extends bindings.Struct { |
418 static const List<bindings.StructDataHeader> kVersions = const [ | 517 static const List<bindings.StructDataHeader> kVersions = const [ |
419 const bindings.StructDataHeader(16, 0) | 518 const bindings.StructDataHeader(16, 0) |
420 ]; | 519 ]; |
421 url_response_mojom.UrlResponse response = null; | 520 url_response_mojom.UrlResponse response = null; |
422 | 521 |
423 UrlLoaderInterceptorInterceptResponseParams() : super(kVersions.last.size); | 522 UrlLoaderInterceptorInterceptResponseParams() : super(kVersions.last.size); |
424 | 523 |
425 static UrlLoaderInterceptorInterceptResponseParams deserialize(bindings.Messag
e message) { | 524 static UrlLoaderInterceptorInterceptResponseParams deserialize(bindings.Messag
e message) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 return "UrlLoaderInterceptorInterceptResponseParams(" | 572 return "UrlLoaderInterceptorInterceptResponseParams(" |
474 "response: $response" ")"; | 573 "response: $response" ")"; |
475 } | 574 } |
476 | 575 |
477 Map toJson() { | 576 Map toJson() { |
478 throw new bindings.MojoCodecError( | 577 throw new bindings.MojoCodecError( |
479 'Object containing handles cannot be encoded to JSON.'); | 578 'Object containing handles cannot be encoded to JSON.'); |
480 } | 579 } |
481 } | 580 } |
482 | 581 |
| 582 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptor_InterceptRe
sponse_Params__() { |
| 583 return new mojom_types.MojomStruct() |
| 584 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorInterceptResponseParams') |
| 585 ..fields = <mojom_types.StructField>[ |
| 586 new mojom_types.StructField() |
| 587 ..declData = (new mojom_types.DeclarationData()..shortName = 'Response') |
| 588 ..type = (new mojom_types.Type() |
| 589 ..typeReference = (new mojom_types.TypeReference() |
| 590 |
| 591 ..identifier = '_url_response_URLResponse__' |
| 592 ..typeKey = '_url_response_URLResponse__' |
| 593 )), |
| 594 ]; |
| 595 } |
| 596 |
483 | 597 |
484 class UrlLoaderInterceptorInterceptResponseResponseParams extends bindings.Struc
t { | 598 class UrlLoaderInterceptorInterceptResponseResponseParams extends bindings.Struc
t { |
485 static const List<bindings.StructDataHeader> kVersions = const [ | 599 static const List<bindings.StructDataHeader> kVersions = const [ |
486 const bindings.StructDataHeader(16, 0) | 600 const bindings.StructDataHeader(16, 0) |
487 ]; | 601 ]; |
488 UrlLoaderInterceptorResponse response = null; | 602 UrlLoaderInterceptorResponse response = null; |
489 | 603 |
490 UrlLoaderInterceptorInterceptResponseResponseParams() : super(kVersions.last.s
ize); | 604 UrlLoaderInterceptorInterceptResponseResponseParams() : super(kVersions.last.s
ize); |
491 | 605 |
492 static UrlLoaderInterceptorInterceptResponseResponseParams deserialize(binding
s.Message message) { | 606 static UrlLoaderInterceptorInterceptResponseResponseParams deserialize(binding
s.Message message) { |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 return "UrlLoaderInterceptorInterceptResponseResponseParams(" | 654 return "UrlLoaderInterceptorInterceptResponseResponseParams(" |
541 "response: $response" ")"; | 655 "response: $response" ")"; |
542 } | 656 } |
543 | 657 |
544 Map toJson() { | 658 Map toJson() { |
545 throw new bindings.MojoCodecError( | 659 throw new bindings.MojoCodecError( |
546 'Object containing handles cannot be encoded to JSON.'); | 660 'Object containing handles cannot be encoded to JSON.'); |
547 } | 661 } |
548 } | 662 } |
549 | 663 |
| 664 mojom_types.MojomStruct _url_loader_interceptor_URLLoaderInterceptor_InterceptRe
sponse_ResponseParams__() { |
| 665 return new mojom_types.MojomStruct() |
| 666 ..declData = (new mojom_types.DeclarationData()..shortName = 'UrlLoaderInter
ceptorInterceptResponseResponseParams') |
| 667 ..fields = <mojom_types.StructField>[ |
| 668 new mojom_types.StructField() |
| 669 ..declData = (new mojom_types.DeclarationData()..shortName = 'Response') |
| 670 ..type = (new mojom_types.Type() |
| 671 ..typeReference = (new mojom_types.TypeReference() |
| 672 ..nullable = true |
| 673 |
| 674 |
| 675 ..identifier = '_url_loader_interceptor_URLLoaderInterceptorResponse__' |
| 676 ..typeKey = '_url_loader_interceptor_URLLoaderInterceptorResponse__' |
| 677 )), |
| 678 ]; |
| 679 } |
| 680 |
| 681 |
550 const int kUrlLoaderInterceptorFactory_create_name = 0; | 682 const int kUrlLoaderInterceptorFactory_create_name = 0; |
551 | 683 |
552 const String UrlLoaderInterceptorFactoryName = | 684 const String UrlLoaderInterceptorFactoryName = |
553 'mojo::URLLoaderInterceptorFactory'; | 685 'mojo::URLLoaderInterceptorFactory'; |
554 | 686 |
| 687 mojom_types.MojomInterface _url_loader_interceptor_URLLoaderInterceptorFactory__
() { |
| 688 return new mojom_types.MojomInterface() |
| 689 ..declData = (new mojom_types.DeclarationData()..shortName = "UrlLoaderInter
ceptorFactory") |
| 690 ..interfaceName = "UrlLoaderInterceptorFactory" |
| 691 ..methods = <int, mojom_types.MojomMethod>{ |
| 692 kUrlLoaderInterceptorFactory_create_name: new mojom_types.MojomMethod() |
| 693 ..declData = (new mojom_types.DeclarationData()..shortName = "Create") |
| 694 ..ordinal = kUrlLoaderInterceptorFactory_create_name..parameters = _url_
loader_interceptor_URLLoaderInterceptorFactory_Create_Params__(), |
| 695 }; |
| 696 } |
| 697 |
| 698 class _UrlLoaderInterceptorFactoryServiceDescription extends service_describer.S
erviceDescription { |
| 699 // Avoid infinite loop by overriding serviceDescription field. |
| 700 final service_describer.ServiceDescription serviceDescription = null; |
| 701 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 702 return _url_loader_interceptor_URLLoaderInterceptorFactory__(); |
| 703 } |
| 704 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 705 return getAllMojomTypeDefinitions()[typeKey]; |
| 706 } |
| 707 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 708 return getAllMojomTypeDefinitions(); |
| 709 } |
| 710 } |
| 711 |
555 abstract class UrlLoaderInterceptorFactory { | 712 abstract class UrlLoaderInterceptorFactory { |
556 void create(Object interceptor); | 713 void create(Object interceptor); |
557 | 714 |
558 } | 715 } |
559 | 716 |
560 | 717 |
561 class UrlLoaderInterceptorFactoryProxyImpl extends bindings.Proxy { | 718 class UrlLoaderInterceptorFactoryProxyImpl extends bindings.Proxy { |
562 UrlLoaderInterceptorFactoryProxyImpl.fromEndpoint( | 719 UrlLoaderInterceptorFactoryProxyImpl.fromEndpoint( |
563 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 720 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
564 | 721 |
565 UrlLoaderInterceptorFactoryProxyImpl.fromHandle(core.MojoHandle handle) : | 722 UrlLoaderInterceptorFactoryProxyImpl.fromHandle(core.MojoHandle handle) : |
566 super.fromHandle(handle); | 723 super.fromHandle(handle); |
567 | 724 |
568 UrlLoaderInterceptorFactoryProxyImpl.unbound() : super.unbound(); | 725 UrlLoaderInterceptorFactoryProxyImpl.unbound() : super.unbound(); |
569 | 726 |
570 static UrlLoaderInterceptorFactoryProxyImpl newFromEndpoint( | 727 static UrlLoaderInterceptorFactoryProxyImpl newFromEndpoint( |
571 core.MojoMessagePipeEndpoint endpoint) { | 728 core.MojoMessagePipeEndpoint endpoint) { |
572 assert(endpoint.setDescription("For UrlLoaderInterceptorFactoryProxyImpl")); | 729 assert(endpoint.setDescription("For UrlLoaderInterceptorFactoryProxyImpl")); |
573 return new UrlLoaderInterceptorFactoryProxyImpl.fromEndpoint(endpoint); | 730 return new UrlLoaderInterceptorFactoryProxyImpl.fromEndpoint(endpoint); |
574 } | 731 } |
575 | 732 |
576 String get name => UrlLoaderInterceptorFactoryName; | 733 String get name => UrlLoaderInterceptorFactoryName; |
577 | 734 |
| 735 service_describer.ServiceDescription get serviceDescription => |
| 736 new _UrlLoaderInterceptorFactoryServiceDescription(); |
| 737 |
578 void handleResponse(bindings.ServiceMessage message) { | 738 void handleResponse(bindings.ServiceMessage message) { |
579 switch (message.header.type) { | 739 switch (message.header.type) { |
580 default: | 740 default: |
581 proxyError("Unexpected message type: ${message.header.type}"); | 741 proxyError("Unexpected message type: ${message.header.type}"); |
582 close(immediate: true); | 742 close(immediate: true); |
583 break; | 743 break; |
584 } | 744 } |
585 } | 745 } |
586 | 746 |
587 String toString() { | 747 String toString() { |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
713 assert(_impl == null); | 873 assert(_impl == null); |
714 _impl = d; | 874 _impl = d; |
715 } | 875 } |
716 | 876 |
717 String toString() { | 877 String toString() { |
718 var superString = super.toString(); | 878 var superString = super.toString(); |
719 return "UrlLoaderInterceptorFactoryStub($superString)"; | 879 return "UrlLoaderInterceptorFactoryStub($superString)"; |
720 } | 880 } |
721 | 881 |
722 int get version => 0; | 882 int get version => 0; |
| 883 |
| 884 service_describer.ServiceDescription get serviceDescription => |
| 885 new _UrlLoaderInterceptorFactoryServiceDescription(); |
723 } | 886 } |
724 | 887 |
725 const int kUrlLoaderInterceptor_interceptRequest_name = 0; | 888 const int kUrlLoaderInterceptor_interceptRequest_name = 0; |
726 const int kUrlLoaderInterceptor_interceptFollowRedirect_name = 1; | 889 const int kUrlLoaderInterceptor_interceptFollowRedirect_name = 1; |
727 const int kUrlLoaderInterceptor_interceptResponse_name = 2; | 890 const int kUrlLoaderInterceptor_interceptResponse_name = 2; |
728 | 891 |
729 const String UrlLoaderInterceptorName = | 892 const String UrlLoaderInterceptorName = |
730 'mojo::URLLoaderInterceptor'; | 893 'mojo::URLLoaderInterceptor'; |
731 | 894 |
| 895 mojom_types.MojomInterface _url_loader_interceptor_URLLoaderInterceptor__() { |
| 896 return new mojom_types.MojomInterface() |
| 897 ..declData = (new mojom_types.DeclarationData()..shortName = "UrlLoaderInter
ceptor") |
| 898 ..interfaceName = "UrlLoaderInterceptor" |
| 899 ..methods = <int, mojom_types.MojomMethod>{ |
| 900 kUrlLoaderInterceptor_interceptRequest_name: new mojom_types.MojomMethod() |
| 901 ..declData = (new mojom_types.DeclarationData()..shortName = "InterceptR
equest") |
| 902 ..ordinal = kUrlLoaderInterceptor_interceptRequest_name |
| 903 ..responseParams = _url_loader_interceptor_URLLoaderInterceptor_Intercep
tRequest_ResponseParams__()..parameters = _url_loader_interceptor_URLLoaderInter
ceptor_InterceptRequest_Params__(),kUrlLoaderInterceptor_interceptFollowRedirect
_name: new mojom_types.MojomMethod() |
| 904 ..declData = (new mojom_types.DeclarationData()..shortName = "InterceptF
ollowRedirect") |
| 905 ..ordinal = kUrlLoaderInterceptor_interceptFollowRedirect_name |
| 906 ..responseParams = _url_loader_interceptor_URLLoaderInterceptor_Intercep
tFollowRedirect_ResponseParams__()..parameters = _url_loader_interceptor_URLLoad
erInterceptor_InterceptFollowRedirect_Params__(),kUrlLoaderInterceptor_intercept
Response_name: new mojom_types.MojomMethod() |
| 907 ..declData = (new mojom_types.DeclarationData()..shortName = "InterceptR
esponse") |
| 908 ..ordinal = kUrlLoaderInterceptor_interceptResponse_name |
| 909 ..responseParams = _url_loader_interceptor_URLLoaderInterceptor_Intercep
tResponse_ResponseParams__()..parameters = _url_loader_interceptor_URLLoaderInte
rceptor_InterceptResponse_Params__(), |
| 910 }; |
| 911 } |
| 912 |
| 913 class _UrlLoaderInterceptorServiceDescription extends service_describer.ServiceD
escription { |
| 914 // Avoid infinite loop by overriding serviceDescription field. |
| 915 final service_describer.ServiceDescription serviceDescription = null; |
| 916 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 917 return _url_loader_interceptor_URLLoaderInterceptor__(); |
| 918 } |
| 919 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 920 return getAllMojomTypeDefinitions()[typeKey]; |
| 921 } |
| 922 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 923 return getAllMojomTypeDefinitions(); |
| 924 } |
| 925 } |
| 926 |
732 abstract class UrlLoaderInterceptor { | 927 abstract class UrlLoaderInterceptor { |
733 dynamic interceptRequest(url_request_mojom.UrlRequest request,[Function respon
seFactory = null]); | 928 dynamic interceptRequest(url_request_mojom.UrlRequest request,[Function respon
seFactory = null]); |
734 dynamic interceptFollowRedirect([Function responseFactory = null]); | 929 dynamic interceptFollowRedirect([Function responseFactory = null]); |
735 dynamic interceptResponse(url_response_mojom.UrlResponse response,[Function re
sponseFactory = null]); | 930 dynamic interceptResponse(url_response_mojom.UrlResponse response,[Function re
sponseFactory = null]); |
736 | 931 |
737 } | 932 } |
738 | 933 |
739 | 934 |
740 class UrlLoaderInterceptorProxyImpl extends bindings.Proxy { | 935 class UrlLoaderInterceptorProxyImpl extends bindings.Proxy { |
741 UrlLoaderInterceptorProxyImpl.fromEndpoint( | 936 UrlLoaderInterceptorProxyImpl.fromEndpoint( |
742 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 937 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
743 | 938 |
744 UrlLoaderInterceptorProxyImpl.fromHandle(core.MojoHandle handle) : | 939 UrlLoaderInterceptorProxyImpl.fromHandle(core.MojoHandle handle) : |
745 super.fromHandle(handle); | 940 super.fromHandle(handle); |
746 | 941 |
747 UrlLoaderInterceptorProxyImpl.unbound() : super.unbound(); | 942 UrlLoaderInterceptorProxyImpl.unbound() : super.unbound(); |
748 | 943 |
749 static UrlLoaderInterceptorProxyImpl newFromEndpoint( | 944 static UrlLoaderInterceptorProxyImpl newFromEndpoint( |
750 core.MojoMessagePipeEndpoint endpoint) { | 945 core.MojoMessagePipeEndpoint endpoint) { |
751 assert(endpoint.setDescription("For UrlLoaderInterceptorProxyImpl")); | 946 assert(endpoint.setDescription("For UrlLoaderInterceptorProxyImpl")); |
752 return new UrlLoaderInterceptorProxyImpl.fromEndpoint(endpoint); | 947 return new UrlLoaderInterceptorProxyImpl.fromEndpoint(endpoint); |
753 } | 948 } |
754 | 949 |
755 String get name => UrlLoaderInterceptorName; | 950 String get name => UrlLoaderInterceptorName; |
756 | 951 |
| 952 service_describer.ServiceDescription get serviceDescription => |
| 953 new _UrlLoaderInterceptorServiceDescription(); |
| 954 |
757 void handleResponse(bindings.ServiceMessage message) { | 955 void handleResponse(bindings.ServiceMessage message) { |
758 switch (message.header.type) { | 956 switch (message.header.type) { |
759 case kUrlLoaderInterceptor_interceptRequest_name: | 957 case kUrlLoaderInterceptor_interceptRequest_name: |
760 var r = UrlLoaderInterceptorInterceptRequestResponseParams.deserialize( | 958 var r = UrlLoaderInterceptorInterceptRequestResponseParams.deserialize( |
761 message.payload); | 959 message.payload); |
762 if (!message.header.hasRequestId) { | 960 if (!message.header.hasRequestId) { |
763 proxyError("Expected a message with a valid request Id."); | 961 proxyError("Expected a message with a valid request Id."); |
764 return; | 962 return; |
765 } | 963 } |
766 Completer c = completerMap[message.header.requestId]; | 964 Completer c = completerMap[message.header.requestId]; |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 assert(_impl == null); | 1242 assert(_impl == null); |
1045 _impl = d; | 1243 _impl = d; |
1046 } | 1244 } |
1047 | 1245 |
1048 String toString() { | 1246 String toString() { |
1049 var superString = super.toString(); | 1247 var superString = super.toString(); |
1050 return "UrlLoaderInterceptorStub($superString)"; | 1248 return "UrlLoaderInterceptorStub($superString)"; |
1051 } | 1249 } |
1052 | 1250 |
1053 int get version => 0; | 1251 int get version => 0; |
| 1252 |
| 1253 service_describer.ServiceDescription get serviceDescription => |
| 1254 new _UrlLoaderInterceptorServiceDescription(); |
1054 } | 1255 } |
1055 | 1256 |
1056 | 1257 |
| 1258 |
| 1259 |
| 1260 |
| 1261 |
| 1262 |
| 1263 |
| 1264 var _MojomDesc__ = _initDescriptions(); |
| 1265 |
| 1266 Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
| 1267 var map = new Map<String, mojom_types.UserDefinedType>(); |
| 1268 |
| 1269 map["_url_loader_interceptor_URLLoaderInterceptorResponse__"] = |
| 1270 new mojom_types.UserDefinedType() |
| 1271 ..structType = _url_loader_interceptor_URLLoaderInterceptorResponse__(); |
| 1272 |
| 1273 |
| 1274 |
| 1275 |
| 1276 |
| 1277 |
| 1278 |
| 1279 map["_url_loader_interceptor_URLLoaderInterceptorFactory_Create_Params__"] = |
| 1280 new mojom_types.UserDefinedType() |
| 1281 ..structType = _url_loader_interceptor_URLLoaderInterceptorFactory_Create_
Params__(); |
| 1282 |
| 1283 |
| 1284 |
| 1285 |
| 1286 |
| 1287 map["_url_loader_interceptor_URLLoaderInterceptor_InterceptRequest_Params__"]
= |
| 1288 new mojom_types.UserDefinedType() |
| 1289 ..structType = _url_loader_interceptor_URLLoaderInterceptor_InterceptReque
st_Params__(); |
| 1290 |
| 1291 |
| 1292 |
| 1293 |
| 1294 |
| 1295 map["_url_loader_interceptor_URLLoaderInterceptor_InterceptRequest_ResponsePar
ams__"] = |
| 1296 new mojom_types.UserDefinedType() |
| 1297 ..structType = _url_loader_interceptor_URLLoaderInterceptor_InterceptReque
st_ResponseParams__(); |
| 1298 |
| 1299 |
| 1300 |
| 1301 |
| 1302 |
| 1303 map["_url_loader_interceptor_URLLoaderInterceptor_InterceptFollowRedirect_Para
ms__"] = |
| 1304 new mojom_types.UserDefinedType() |
| 1305 ..structType = _url_loader_interceptor_URLLoaderInterceptor_InterceptFollo
wRedirect_Params__(); |
| 1306 |
| 1307 |
| 1308 |
| 1309 map["_url_loader_interceptor_URLLoaderInterceptor_InterceptFollowRedirect_Resp
onseParams__"] = |
| 1310 new mojom_types.UserDefinedType() |
| 1311 ..structType = _url_loader_interceptor_URLLoaderInterceptor_InterceptFollo
wRedirect_ResponseParams__(); |
| 1312 |
| 1313 |
| 1314 |
| 1315 |
| 1316 |
| 1317 map["_url_loader_interceptor_URLLoaderInterceptor_InterceptResponse_Params__"]
= |
| 1318 new mojom_types.UserDefinedType() |
| 1319 ..structType = _url_loader_interceptor_URLLoaderInterceptor_InterceptRespo
nse_Params__(); |
| 1320 |
| 1321 |
| 1322 |
| 1323 |
| 1324 |
| 1325 map["_url_loader_interceptor_URLLoaderInterceptor_InterceptResponse_ResponsePa
rams__"] = |
| 1326 new mojom_types.UserDefinedType() |
| 1327 ..structType = _url_loader_interceptor_URLLoaderInterceptor_InterceptRespo
nse_ResponseParams__(); |
| 1328 |
| 1329 |
| 1330 |
| 1331 |
| 1332 |
| 1333 map["_url_loader_interceptor_URLLoaderInterceptorFactory__"] = |
| 1334 new mojom_types.UserDefinedType() |
| 1335 ..interfaceType = _url_loader_interceptor_URLLoaderInterceptorFactory__(); |
| 1336 |
| 1337 |
| 1338 map["_url_loader_interceptor_URLLoaderInterceptor__"] = |
| 1339 new mojom_types.UserDefinedType() |
| 1340 ..interfaceType = _url_loader_interceptor_URLLoaderInterceptor__(); |
| 1341 |
| 1342 url_request_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.Us
erDefinedType udt) { |
| 1343 map[s] = udt; |
| 1344 }); |
| 1345 url_response_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.U
serDefinedType udt) { |
| 1346 map[s] = udt; |
| 1347 }); |
| 1348 return map; |
| 1349 } |
| 1350 |
| 1351 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
| 1352 return _MojomDesc__; |
| 1353 } |
| 1354 |
| 1355 |
OLD | NEW |