OLD | NEW |
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 url_request_mojom; | 4 library url_request_mojom; |
5 import 'package:mojo/bindings.dart' as bindings; | 5 import 'package:mojo/bindings.dart' as bindings; |
6 import 'package:mojo/core.dart' as core; | 6 import 'package:mojo/core.dart' as core; |
7 | 7 |
8 import 'package:mojo/mojo/http_header.mojom.dart' as http_header_mojom; | 8 import 'package:mojo/mojo/http_header.mojom.dart' as http_header_mojom; |
9 | 9 |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 String url = null; | 75 String url = null; |
76 String method = "GET"; | 76 String method = "GET"; |
77 List<http_header_mojom.HttpHeader> headers = null; | 77 List<http_header_mojom.HttpHeader> headers = null; |
78 List<core.MojoDataPipeConsumer> body = null; | 78 List<core.MojoDataPipeConsumer> body = null; |
79 int responseBodyBufferSize = 0; | 79 int responseBodyBufferSize = 0; |
80 bool autoFollowRedirects = false; | 80 bool autoFollowRedirects = false; |
81 UrlRequestCacheMode cacheMode = new UrlRequestCacheMode(0); | 81 UrlRequestCacheMode cacheMode = new UrlRequestCacheMode(0); |
82 | 82 |
83 UrlRequest() : super(kVersions.last.size); | 83 UrlRequest() : super(kVersions.last.size); |
84 | 84 |
| 85 UrlRequest.init( |
| 86 String this.url, |
| 87 String this.method, |
| 88 List<http_header_mojom.HttpHeader> this.headers, |
| 89 List<core.MojoDataPipeConsumer> this.body, |
| 90 int this.responseBodyBufferSize, |
| 91 bool this.autoFollowRedirects, |
| 92 UrlRequestCacheMode this.cacheMode |
| 93 ) : super(kVersions.last.size); |
| 94 |
85 static UrlRequest deserialize(bindings.Message message) { | 95 static UrlRequest deserialize(bindings.Message message) { |
86 var decoder = new bindings.Decoder(message); | 96 var decoder = new bindings.Decoder(message); |
87 var result = decode(decoder); | 97 var result = decode(decoder); |
88 if (decoder.excessHandles != null) { | 98 if (decoder.excessHandles != null) { |
89 decoder.excessHandles.forEach((h) => h.close()); | 99 decoder.excessHandles.forEach((h) => h.close()); |
90 } | 100 } |
91 return result; | 101 return result; |
92 } | 102 } |
93 | 103 |
94 static UrlRequest decode(bindings.Decoder decoder0) { | 104 static UrlRequest decode(bindings.Decoder decoder0) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 } | 243 } |
234 | 244 |
235 Map toJson() { | 245 Map toJson() { |
236 throw new bindings.MojoCodecError( | 246 throw new bindings.MojoCodecError( |
237 'Object containing handles cannot be encoded to JSON.'); | 247 'Object containing handles cannot be encoded to JSON.'); |
238 } | 248 } |
239 } | 249 } |
240 | 250 |
241 | 251 |
242 | 252 |
OLD | NEW |