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

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

Issue 1753013002: Mojom runtime type info: New implementation for Dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: No changes to sha1s Created 4 years, 9 months 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 url_loader_mojom; 5 library url_loader_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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 Map toJson() { 94 Map toJson() {
95 Map map = new Map(); 95 Map map = new Map();
96 map["error"] = error; 96 map["error"] = error;
97 map["isLoading"] = isLoading; 97 map["isLoading"] = isLoading;
98 return map; 98 return map;
99 } 99 }
100 } 100 }
101 101
102 102
103
104
105 class _UrlLoaderStartParams extends bindings.Struct { 103 class _UrlLoaderStartParams extends bindings.Struct {
106 static const List<bindings.StructDataHeader> kVersions = const [ 104 static const List<bindings.StructDataHeader> kVersions = const [
107 const bindings.StructDataHeader(16, 0) 105 const bindings.StructDataHeader(16, 0)
108 ]; 106 ];
109 url_request_mojom.UrlRequest request = null; 107 url_request_mojom.UrlRequest request = null;
110 108
111 _UrlLoaderStartParams() : super(kVersions.last.size); 109 _UrlLoaderStartParams() : super(kVersions.last.size);
112 110
113 static _UrlLoaderStartParams deserialize(bindings.Message message) { 111 static _UrlLoaderStartParams deserialize(bindings.Message message) {
114 var decoder = new bindings.Decoder(message); 112 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 "request: $request" ")"; 165 "request: $request" ")";
168 } 166 }
169 167
170 Map toJson() { 168 Map toJson() {
171 throw new bindings.MojoCodecError( 169 throw new bindings.MojoCodecError(
172 'Object containing handles cannot be encoded to JSON.'); 170 'Object containing handles cannot be encoded to JSON.');
173 } 171 }
174 } 172 }
175 173
176 174
177
178
179 class UrlLoaderStartResponseParams extends bindings.Struct { 175 class UrlLoaderStartResponseParams extends bindings.Struct {
180 static const List<bindings.StructDataHeader> kVersions = const [ 176 static const List<bindings.StructDataHeader> kVersions = const [
181 const bindings.StructDataHeader(16, 0) 177 const bindings.StructDataHeader(16, 0)
182 ]; 178 ];
183 url_response_mojom.UrlResponse response = null; 179 url_response_mojom.UrlResponse response = null;
184 180
185 UrlLoaderStartResponseParams() : super(kVersions.last.size); 181 UrlLoaderStartResponseParams() : super(kVersions.last.size);
186 182
187 static UrlLoaderStartResponseParams deserialize(bindings.Message message) { 183 static UrlLoaderStartResponseParams deserialize(bindings.Message message) {
188 var decoder = new bindings.Decoder(message); 184 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 "response: $response" ")"; 237 "response: $response" ")";
242 } 238 }
243 239
244 Map toJson() { 240 Map toJson() {
245 throw new bindings.MojoCodecError( 241 throw new bindings.MojoCodecError(
246 'Object containing handles cannot be encoded to JSON.'); 242 'Object containing handles cannot be encoded to JSON.');
247 } 243 }
248 } 244 }
249 245
250 246
251
252
253 class _UrlLoaderFollowRedirectParams extends bindings.Struct { 247 class _UrlLoaderFollowRedirectParams extends bindings.Struct {
254 static const List<bindings.StructDataHeader> kVersions = const [ 248 static const List<bindings.StructDataHeader> kVersions = const [
255 const bindings.StructDataHeader(8, 0) 249 const bindings.StructDataHeader(8, 0)
256 ]; 250 ];
257 251
258 _UrlLoaderFollowRedirectParams() : super(kVersions.last.size); 252 _UrlLoaderFollowRedirectParams() : super(kVersions.last.size);
259 253
260 static _UrlLoaderFollowRedirectParams deserialize(bindings.Message message) { 254 static _UrlLoaderFollowRedirectParams deserialize(bindings.Message message) {
261 var decoder = new bindings.Decoder(message); 255 var decoder = new bindings.Decoder(message);
262 var result = decode(decoder); 256 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 return "_UrlLoaderFollowRedirectParams("")"; 295 return "_UrlLoaderFollowRedirectParams("")";
302 } 296 }
303 297
304 Map toJson() { 298 Map toJson() {
305 Map map = new Map(); 299 Map map = new Map();
306 return map; 300 return map;
307 } 301 }
308 } 302 }
309 303
310 304
311
312
313 class UrlLoaderFollowRedirectResponseParams extends bindings.Struct { 305 class UrlLoaderFollowRedirectResponseParams extends bindings.Struct {
314 static const List<bindings.StructDataHeader> kVersions = const [ 306 static const List<bindings.StructDataHeader> kVersions = const [
315 const bindings.StructDataHeader(16, 0) 307 const bindings.StructDataHeader(16, 0)
316 ]; 308 ];
317 url_response_mojom.UrlResponse response = null; 309 url_response_mojom.UrlResponse response = null;
318 310
319 UrlLoaderFollowRedirectResponseParams() : super(kVersions.last.size); 311 UrlLoaderFollowRedirectResponseParams() : super(kVersions.last.size);
320 312
321 static UrlLoaderFollowRedirectResponseParams deserialize(bindings.Message mess age) { 313 static UrlLoaderFollowRedirectResponseParams deserialize(bindings.Message mess age) {
322 var decoder = new bindings.Decoder(message); 314 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 "response: $response" ")"; 367 "response: $response" ")";
376 } 368 }
377 369
378 Map toJson() { 370 Map toJson() {
379 throw new bindings.MojoCodecError( 371 throw new bindings.MojoCodecError(
380 'Object containing handles cannot be encoded to JSON.'); 372 'Object containing handles cannot be encoded to JSON.');
381 } 373 }
382 } 374 }
383 375
384 376
385
386
387 class _UrlLoaderQueryStatusParams extends bindings.Struct { 377 class _UrlLoaderQueryStatusParams extends bindings.Struct {
388 static const List<bindings.StructDataHeader> kVersions = const [ 378 static const List<bindings.StructDataHeader> kVersions = const [
389 const bindings.StructDataHeader(8, 0) 379 const bindings.StructDataHeader(8, 0)
390 ]; 380 ];
391 381
392 _UrlLoaderQueryStatusParams() : super(kVersions.last.size); 382 _UrlLoaderQueryStatusParams() : super(kVersions.last.size);
393 383
394 static _UrlLoaderQueryStatusParams deserialize(bindings.Message message) { 384 static _UrlLoaderQueryStatusParams deserialize(bindings.Message message) {
395 var decoder = new bindings.Decoder(message); 385 var decoder = new bindings.Decoder(message);
396 var result = decode(decoder); 386 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
435 return "_UrlLoaderQueryStatusParams("")"; 425 return "_UrlLoaderQueryStatusParams("")";
436 } 426 }
437 427
438 Map toJson() { 428 Map toJson() {
439 Map map = new Map(); 429 Map map = new Map();
440 return map; 430 return map;
441 } 431 }
442 } 432 }
443 433
444 434
445
446
447 class UrlLoaderQueryStatusResponseParams extends bindings.Struct { 435 class UrlLoaderQueryStatusResponseParams extends bindings.Struct {
448 static const List<bindings.StructDataHeader> kVersions = const [ 436 static const List<bindings.StructDataHeader> kVersions = const [
449 const bindings.StructDataHeader(16, 0) 437 const bindings.StructDataHeader(16, 0)
450 ]; 438 ];
451 UrlLoaderStatus status = null; 439 UrlLoaderStatus status = null;
452 440
453 UrlLoaderQueryStatusResponseParams() : super(kVersions.last.size); 441 UrlLoaderQueryStatusResponseParams() : super(kVersions.last.size);
454 442
455 static UrlLoaderQueryStatusResponseParams deserialize(bindings.Message message ) { 443 static UrlLoaderQueryStatusResponseParams deserialize(bindings.Message message ) {
456 var decoder = new bindings.Decoder(message); 444 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 "status: $status" ")"; 497 "status: $status" ")";
510 } 498 }
511 499
512 Map toJson() { 500 Map toJson() {
513 Map map = new Map(); 501 Map map = new Map();
514 map["status"] = status; 502 map["status"] = status;
515 return map; 503 return map;
516 } 504 }
517 } 505 }
518 506
519
520
521
522 const int _UrlLoader_startName = 0; 507 const int _UrlLoader_startName = 0;
523 const int _UrlLoader_followRedirectName = 1; 508 const int _UrlLoader_followRedirectName = 1;
524 const int _UrlLoader_queryStatusName = 2; 509 const int _UrlLoader_queryStatusName = 2;
525 510
526
527
528 class _UrlLoaderServiceDescription implements service_describer.ServiceDescripti on { 511 class _UrlLoaderServiceDescription implements service_describer.ServiceDescripti on {
529 dynamic getTopLevelInterface([Function responseFactory]) => 512 dynamic getTopLevelInterface([Function responseFactory]) =>
530 responseFactory(null); 513 responseFactory(null);
531 514
532 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 515 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
533 responseFactory(null); 516 responseFactory(null);
534 517
535 dynamic getAllTypeDefinitions([Function responseFactory]) => 518 dynamic getAllTypeDefinitions([Function responseFactory]) =>
536 responseFactory(null); 519 responseFactory(null);
537 } 520 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
858 static service_describer.ServiceDescription get serviceDescription { 841 static service_describer.ServiceDescription get serviceDescription {
859 if (_cachedServiceDescription == null) { 842 if (_cachedServiceDescription == null) {
860 _cachedServiceDescription = new _UrlLoaderServiceDescription(); 843 _cachedServiceDescription = new _UrlLoaderServiceDescription();
861 } 844 }
862 return _cachedServiceDescription; 845 return _cachedServiceDescription;
863 } 846 }
864 } 847 }
865 848
866 849
867 850
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698