Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1087)

Side by Side Diff: mojo/dart/packages/mojo_services/lib/http_server/http_response.mojom.dart

Issue 1433183002: Generate Mojom Types for Dart (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Simplify identifier_store for Go and Dart Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/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 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 "contentType: $contentType" ", " 159 "contentType: $contentType" ", "
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
169 mojom_types.MojomStruct _http_response_HttpResponse__() {
170 return new mojom_types.MojomStruct()
171 ..declData = (new mojom_types.DeclarationData()..shortName = 'HttpResponse')
172 ..fields = <mojom_types.StructField>[
173 new mojom_types.StructField()
174 ..declData = (new mojom_types.DeclarationData()..shortName = 'StatusCode ')
175 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.UI NT32),
176
177 new mojom_types.StructField()
178 ..declData = (new mojom_types.DeclarationData()..shortName = 'Body')
179 ..type = (new mojom_types.Type()
180 ..handleType = (new mojom_types.HandleType()
181 ..kind = mojom_types.HandleTypeKind.DATA_PIPE_CONSUMER
182 ..nullable = true)),
183
184 new mojom_types.StructField()
185 ..declData = (new mojom_types.DeclarationData()..shortName = 'ContentLen gth')
186 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.IN T64),
187
188 new mojom_types.StructField()
189 ..declData = (new mojom_types.DeclarationData()..shortName = 'ContentTyp e')
190 ..type = (new mojom_types.Type()
191 ..stringType = (new mojom_types.StringType()..nullable = false)),
192
193 new mojom_types.StructField()
194 ..declData = (new mojom_types.DeclarationData()..shortName = 'CustomHead ers')
195 ..type = (new mojom_types.Type()..mapType = (new mojom_types.MapType()
196 ..nullable = true
197
198 ..keyType = (new mojom_types.Type()
199 ..stringType = (new mojom_types.StringType()..nullable = false))
200 ..valueType = (new mojom_types.Type()
201 ..stringType = (new mojom_types.StringType()..nullable = false)))),
202 ];
203 }
167 204
205
206
207
208
209
210
211
212
213 var _MojomDesc__ = _initDescriptions();
214
215 Map<String, mojom_types.UserDefinedType> _initDescriptions() {
216 var map = new Map<String, mojom_types.UserDefinedType>();
217
218 map["_http_response_HttpResponse__"] =
219 new mojom_types.UserDefinedType()
220 ..structType = _http_response_HttpResponse__();
221
222
223
224
225
226
227
228
229
230
231
232
233 return map;
234 }
235
236 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() {
237 return _MojomDesc__;
238 }
239
240
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698