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_response_mojom; | 5 library http_response_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/bindings/types/mojom_types.mojom.dart' as mojom_types; |
11 | 12 |
12 | 13 |
13 | 14 |
| 15 |
14 class HttpResponse extends bindings.Struct { | 16 class HttpResponse extends bindings.Struct { |
15 static const List<bindings.StructDataHeader> kVersions = const [ | 17 static const List<bindings.StructDataHeader> kVersions = const [ |
16 const bindings.StructDataHeader(40, 0) | 18 const bindings.StructDataHeader(40, 0) |
17 ]; | 19 ]; |
18 int statusCode = 200; | 20 int statusCode = 200; |
19 core.MojoDataPipeConsumer body = null; | 21 core.MojoDataPipeConsumer body = null; |
20 int contentLength = 0; | 22 int contentLength = 0; |
21 String contentType = "text/html; charset=utf-8"; | 23 String contentType = "text/html; charset=utf-8"; |
22 Map<String, String> customHeaders = null; | 24 Map<String, String> customHeaders = null; |
23 | 25 |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 "customHeaders: $customHeaders" ")"; | 160 "customHeaders: $customHeaders" ")"; |
159 } | 161 } |
160 | 162 |
161 Map toJson() { | 163 Map toJson() { |
162 throw new bindings.MojoCodecError( | 164 throw new bindings.MojoCodecError( |
163 'Object containing handles cannot be encoded to JSON.'); | 165 'Object containing handles cannot be encoded to JSON.'); |
164 } | 166 } |
165 } | 167 } |
166 | 168 |
167 | 169 |
| 170 |
| 171 |
| 172 |
| 173 |
| 174 |
OLD | NEW |