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

Side by Side Diff: mojo/dart/packages/mojo/lib/mojo/bindings/types/service_describer.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 service_describer_mojom; 5 library service_describer_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 9
10 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types_ mojom; 10 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types_ mojom;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 "descriptionRequest: $descriptionRequest" ")"; 88 "descriptionRequest: $descriptionRequest" ")";
89 } 89 }
90 90
91 Map toJson() { 91 Map toJson() {
92 throw new bindings.MojoCodecError( 92 throw new bindings.MojoCodecError(
93 'Object containing handles cannot be encoded to JSON.'); 93 'Object containing handles cannot be encoded to JSON.');
94 } 94 }
95 } 95 }
96 96
97 97
98
99
100 class _ServiceDescriptionGetTopLevelInterfaceParams extends bindings.Struct { 98 class _ServiceDescriptionGetTopLevelInterfaceParams extends bindings.Struct {
101 static const List<bindings.StructDataHeader> kVersions = const [ 99 static const List<bindings.StructDataHeader> kVersions = const [
102 const bindings.StructDataHeader(8, 0) 100 const bindings.StructDataHeader(8, 0)
103 ]; 101 ];
104 102
105 _ServiceDescriptionGetTopLevelInterfaceParams() : super(kVersions.last.size); 103 _ServiceDescriptionGetTopLevelInterfaceParams() : super(kVersions.last.size);
106 104
107 static _ServiceDescriptionGetTopLevelInterfaceParams deserialize(bindings.Mess age message) { 105 static _ServiceDescriptionGetTopLevelInterfaceParams deserialize(bindings.Mess age message) {
108 var decoder = new bindings.Decoder(message); 106 var decoder = new bindings.Decoder(message);
109 var result = decode(decoder); 107 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 return "_ServiceDescriptionGetTopLevelInterfaceParams("")"; 146 return "_ServiceDescriptionGetTopLevelInterfaceParams("")";
149 } 147 }
150 148
151 Map toJson() { 149 Map toJson() {
152 Map map = new Map(); 150 Map map = new Map();
153 return map; 151 return map;
154 } 152 }
155 } 153 }
156 154
157 155
158
159
160 class ServiceDescriptionGetTopLevelInterfaceResponseParams extends bindings.Stru ct { 156 class ServiceDescriptionGetTopLevelInterfaceResponseParams extends bindings.Stru ct {
161 static const List<bindings.StructDataHeader> kVersions = const [ 157 static const List<bindings.StructDataHeader> kVersions = const [
162 const bindings.StructDataHeader(16, 0) 158 const bindings.StructDataHeader(16, 0)
163 ]; 159 ];
164 mojom_types_mojom.MojomInterface mojomInterface = null; 160 mojom_types_mojom.MojomInterface mojomInterface = null;
165 161
166 ServiceDescriptionGetTopLevelInterfaceResponseParams() : super(kVersions.last. size); 162 ServiceDescriptionGetTopLevelInterfaceResponseParams() : super(kVersions.last. size);
167 163
168 static ServiceDescriptionGetTopLevelInterfaceResponseParams deserialize(bindin gs.Message message) { 164 static ServiceDescriptionGetTopLevelInterfaceResponseParams deserialize(bindin gs.Message message) {
169 var decoder = new bindings.Decoder(message); 165 var decoder = new bindings.Decoder(message);
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 } 219 }
224 220
225 Map toJson() { 221 Map toJson() {
226 Map map = new Map(); 222 Map map = new Map();
227 map["mojomInterface"] = mojomInterface; 223 map["mojomInterface"] = mojomInterface;
228 return map; 224 return map;
229 } 225 }
230 } 226 }
231 227
232 228
233
234
235 class _ServiceDescriptionGetTypeDefinitionParams extends bindings.Struct { 229 class _ServiceDescriptionGetTypeDefinitionParams extends bindings.Struct {
236 static const List<bindings.StructDataHeader> kVersions = const [ 230 static const List<bindings.StructDataHeader> kVersions = const [
237 const bindings.StructDataHeader(16, 0) 231 const bindings.StructDataHeader(16, 0)
238 ]; 232 ];
239 String typeKey = null; 233 String typeKey = null;
240 234
241 _ServiceDescriptionGetTypeDefinitionParams() : super(kVersions.last.size); 235 _ServiceDescriptionGetTypeDefinitionParams() : super(kVersions.last.size);
242 236
243 static _ServiceDescriptionGetTypeDefinitionParams deserialize(bindings.Message message) { 237 static _ServiceDescriptionGetTypeDefinitionParams deserialize(bindings.Message message) {
244 var decoder = new bindings.Decoder(message); 238 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 } 291 }
298 292
299 Map toJson() { 293 Map toJson() {
300 Map map = new Map(); 294 Map map = new Map();
301 map["typeKey"] = typeKey; 295 map["typeKey"] = typeKey;
302 return map; 296 return map;
303 } 297 }
304 } 298 }
305 299
306 300
307
308
309 class ServiceDescriptionGetTypeDefinitionResponseParams extends bindings.Struct { 301 class ServiceDescriptionGetTypeDefinitionResponseParams extends bindings.Struct {
310 static const List<bindings.StructDataHeader> kVersions = const [ 302 static const List<bindings.StructDataHeader> kVersions = const [
311 const bindings.StructDataHeader(24, 0) 303 const bindings.StructDataHeader(24, 0)
312 ]; 304 ];
313 mojom_types_mojom.UserDefinedType type = null; 305 mojom_types_mojom.UserDefinedType type = null;
314 306
315 ServiceDescriptionGetTypeDefinitionResponseParams() : super(kVersions.last.siz e); 307 ServiceDescriptionGetTypeDefinitionResponseParams() : super(kVersions.last.siz e);
316 308
317 static ServiceDescriptionGetTypeDefinitionResponseParams deserialize(bindings. Message message) { 309 static ServiceDescriptionGetTypeDefinitionResponseParams deserialize(bindings. Message message) {
318 var decoder = new bindings.Decoder(message); 310 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 363 }
372 364
373 Map toJson() { 365 Map toJson() {
374 Map map = new Map(); 366 Map map = new Map();
375 map["type"] = type; 367 map["type"] = type;
376 return map; 368 return map;
377 } 369 }
378 } 370 }
379 371
380 372
381
382
383 class _ServiceDescriptionGetAllTypeDefinitionsParams extends bindings.Struct { 373 class _ServiceDescriptionGetAllTypeDefinitionsParams extends bindings.Struct {
384 static const List<bindings.StructDataHeader> kVersions = const [ 374 static const List<bindings.StructDataHeader> kVersions = const [
385 const bindings.StructDataHeader(8, 0) 375 const bindings.StructDataHeader(8, 0)
386 ]; 376 ];
387 377
388 _ServiceDescriptionGetAllTypeDefinitionsParams() : super(kVersions.last.size); 378 _ServiceDescriptionGetAllTypeDefinitionsParams() : super(kVersions.last.size);
389 379
390 static _ServiceDescriptionGetAllTypeDefinitionsParams deserialize(bindings.Mes sage message) { 380 static _ServiceDescriptionGetAllTypeDefinitionsParams deserialize(bindings.Mes sage message) {
391 var decoder = new bindings.Decoder(message); 381 var decoder = new bindings.Decoder(message);
392 var result = decode(decoder); 382 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 return "_ServiceDescriptionGetAllTypeDefinitionsParams("")"; 421 return "_ServiceDescriptionGetAllTypeDefinitionsParams("")";
432 } 422 }
433 423
434 Map toJson() { 424 Map toJson() {
435 Map map = new Map(); 425 Map map = new Map();
436 return map; 426 return map;
437 } 427 }
438 } 428 }
439 429
440 430
441
442
443 class ServiceDescriptionGetAllTypeDefinitionsResponseParams extends bindings.Str uct { 431 class ServiceDescriptionGetAllTypeDefinitionsResponseParams extends bindings.Str uct {
444 static const List<bindings.StructDataHeader> kVersions = const [ 432 static const List<bindings.StructDataHeader> kVersions = const [
445 const bindings.StructDataHeader(16, 0) 433 const bindings.StructDataHeader(16, 0)
446 ]; 434 ];
447 Map<String, mojom_types_mojom.UserDefinedType> definitions = null; 435 Map<String, mojom_types_mojom.UserDefinedType> definitions = null;
448 436
449 ServiceDescriptionGetAllTypeDefinitionsResponseParams() : super(kVersions.last .size); 437 ServiceDescriptionGetAllTypeDefinitionsResponseParams() : super(kVersions.last .size);
450 438
451 static ServiceDescriptionGetAllTypeDefinitionsResponseParams deserialize(bindi ngs.Message message) { 439 static ServiceDescriptionGetAllTypeDefinitionsResponseParams deserialize(bindi ngs.Message message) {
452 var decoder = new bindings.Decoder(message); 440 var decoder = new bindings.Decoder(message);
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
561 "definitions: $definitions" ")"; 549 "definitions: $definitions" ")";
562 } 550 }
563 551
564 Map toJson() { 552 Map toJson() {
565 Map map = new Map(); 553 Map map = new Map();
566 map["definitions"] = definitions; 554 map["definitions"] = definitions;
567 return map; 555 return map;
568 } 556 }
569 } 557 }
570 558
571
572
573
574 const int _ServiceDescriber_describeServiceName = 0; 559 const int _ServiceDescriber_describeServiceName = 0;
575 560
576
577
578 class _ServiceDescriberServiceDescription implements ServiceDescription { 561 class _ServiceDescriberServiceDescription implements ServiceDescription {
579 dynamic getTopLevelInterface([Function responseFactory]) => 562 dynamic getTopLevelInterface([Function responseFactory]) =>
580 responseFactory(null); 563 responseFactory(null);
581 564
582 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 565 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
583 responseFactory(null); 566 responseFactory(null);
584 567
585 dynamic getAllTypeDefinitions([Function responseFactory]) => 568 dynamic getAllTypeDefinitions([Function responseFactory]) =>
586 responseFactory(null); 569 responseFactory(null);
587 } 570 }
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 _cachedServiceDescription = new _ServiceDescriberServiceDescription(); 744 _cachedServiceDescription = new _ServiceDescriberServiceDescription();
762 } 745 }
763 return _cachedServiceDescription; 746 return _cachedServiceDescription;
764 } 747 }
765 } 748 }
766 749
767 const int _ServiceDescription_getTopLevelInterfaceName = 0; 750 const int _ServiceDescription_getTopLevelInterfaceName = 0;
768 const int _ServiceDescription_getTypeDefinitionName = 1; 751 const int _ServiceDescription_getTypeDefinitionName = 1;
769 const int _ServiceDescription_getAllTypeDefinitionsName = 2; 752 const int _ServiceDescription_getAllTypeDefinitionsName = 2;
770 753
771
772
773 class _ServiceDescriptionServiceDescription implements ServiceDescription { 754 class _ServiceDescriptionServiceDescription implements ServiceDescription {
774 dynamic getTopLevelInterface([Function responseFactory]) => 755 dynamic getTopLevelInterface([Function responseFactory]) =>
775 responseFactory(null); 756 responseFactory(null);
776 757
777 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 758 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
778 responseFactory(null); 759 responseFactory(null);
779 760
780 dynamic getAllTypeDefinitions([Function responseFactory]) => 761 dynamic getAllTypeDefinitions([Function responseFactory]) =>
781 responseFactory(null); 762 responseFactory(null);
782 } 763 }
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
1103 static ServiceDescription get serviceDescription { 1084 static ServiceDescription get serviceDescription {
1104 if (_cachedServiceDescription == null) { 1085 if (_cachedServiceDescription == null) {
1105 _cachedServiceDescription = new _ServiceDescriptionServiceDescription(); 1086 _cachedServiceDescription = new _ServiceDescriptionServiceDescription();
1106 } 1087 }
1107 return _cachedServiceDescription; 1088 return _cachedServiceDescription;
1108 } 1089 }
1109 } 1090 }
1110 1091
1111 1092
1112 1093
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698