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

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

Issue 1753013002: Mojom runtime type info: New implementation for Dart. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: 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 process_mojom; 5 library process_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_services/mojo/files/file.mojom.dart' as file_mojom; 10 import 'package:mojo_services/mojo/files/file.mojom.dart' as file_mojom;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 "processController: $processController" ")"; 188 "processController: $processController" ")";
189 } 189 }
190 190
191 Map toJson() { 191 Map toJson() {
192 throw new bindings.MojoCodecError( 192 throw new bindings.MojoCodecError(
193 'Object containing handles cannot be encoded to JSON.'); 193 'Object containing handles cannot be encoded to JSON.');
194 } 194 }
195 } 195 }
196 196
197 197
198
199
200 class ProcessSpawnResponseParams extends bindings.Struct { 198 class ProcessSpawnResponseParams extends bindings.Struct {
201 static const List<bindings.StructDataHeader> kVersions = const [ 199 static const List<bindings.StructDataHeader> kVersions = const [
202 const bindings.StructDataHeader(16, 0) 200 const bindings.StructDataHeader(16, 0)
203 ]; 201 ];
204 types_mojom.Error error = null; 202 types_mojom.Error error = null;
205 203
206 ProcessSpawnResponseParams() : super(kVersions.last.size); 204 ProcessSpawnResponseParams() : super(kVersions.last.size);
207 205
208 static ProcessSpawnResponseParams deserialize(bindings.Message message) { 206 static ProcessSpawnResponseParams deserialize(bindings.Message message) {
209 var decoder = new bindings.Decoder(message); 207 var decoder = new bindings.Decoder(message);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 264 }
267 265
268 Map toJson() { 266 Map toJson() {
269 Map map = new Map(); 267 Map map = new Map();
270 map["error"] = error; 268 map["error"] = error;
271 return map; 269 return map;
272 } 270 }
273 } 271 }
274 272
275 273
276
277
278 class _ProcessSpawnWithTerminalParams extends bindings.Struct { 274 class _ProcessSpawnWithTerminalParams extends bindings.Struct {
279 static const List<bindings.StructDataHeader> kVersions = const [ 275 static const List<bindings.StructDataHeader> kVersions = const [
280 const bindings.StructDataHeader(48, 0) 276 const bindings.StructDataHeader(48, 0)
281 ]; 277 ];
282 List<int> path = null; 278 List<int> path = null;
283 List<List<int>> argv = null; 279 List<List<int>> argv = null;
284 List<List<int>> envp = null; 280 List<List<int>> envp = null;
285 Object terminalFile = null; 281 Object terminalFile = null;
286 Object processController = null; 282 Object processController = null;
287 283
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 "processController: $processController" ")"; 421 "processController: $processController" ")";
426 } 422 }
427 423
428 Map toJson() { 424 Map toJson() {
429 throw new bindings.MojoCodecError( 425 throw new bindings.MojoCodecError(
430 'Object containing handles cannot be encoded to JSON.'); 426 'Object containing handles cannot be encoded to JSON.');
431 } 427 }
432 } 428 }
433 429
434 430
435
436
437 class ProcessSpawnWithTerminalResponseParams extends bindings.Struct { 431 class ProcessSpawnWithTerminalResponseParams extends bindings.Struct {
438 static const List<bindings.StructDataHeader> kVersions = const [ 432 static const List<bindings.StructDataHeader> kVersions = const [
439 const bindings.StructDataHeader(16, 0) 433 const bindings.StructDataHeader(16, 0)
440 ]; 434 ];
441 types_mojom.Error error = null; 435 types_mojom.Error error = null;
442 436
443 ProcessSpawnWithTerminalResponseParams() : super(kVersions.last.size); 437 ProcessSpawnWithTerminalResponseParams() : super(kVersions.last.size);
444 438
445 static ProcessSpawnWithTerminalResponseParams deserialize(bindings.Message mes sage) { 439 static ProcessSpawnWithTerminalResponseParams deserialize(bindings.Message mes sage) {
446 var decoder = new bindings.Decoder(message); 440 var decoder = new bindings.Decoder(message);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 497 }
504 498
505 Map toJson() { 499 Map toJson() {
506 Map map = new Map(); 500 Map map = new Map();
507 map["error"] = error; 501 map["error"] = error;
508 return map; 502 return map;
509 } 503 }
510 } 504 }
511 505
512 506
513
514
515 class _ProcessControllerWaitParams extends bindings.Struct { 507 class _ProcessControllerWaitParams extends bindings.Struct {
516 static const List<bindings.StructDataHeader> kVersions = const [ 508 static const List<bindings.StructDataHeader> kVersions = const [
517 const bindings.StructDataHeader(8, 0) 509 const bindings.StructDataHeader(8, 0)
518 ]; 510 ];
519 511
520 _ProcessControllerWaitParams() : super(kVersions.last.size); 512 _ProcessControllerWaitParams() : super(kVersions.last.size);
521 513
522 static _ProcessControllerWaitParams deserialize(bindings.Message message) { 514 static _ProcessControllerWaitParams deserialize(bindings.Message message) {
523 var decoder = new bindings.Decoder(message); 515 var decoder = new bindings.Decoder(message);
524 var result = decode(decoder); 516 var result = decode(decoder);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 return "_ProcessControllerWaitParams("")"; 555 return "_ProcessControllerWaitParams("")";
564 } 556 }
565 557
566 Map toJson() { 558 Map toJson() {
567 Map map = new Map(); 559 Map map = new Map();
568 return map; 560 return map;
569 } 561 }
570 } 562 }
571 563
572 564
573
574
575 class ProcessControllerWaitResponseParams extends bindings.Struct { 565 class ProcessControllerWaitResponseParams extends bindings.Struct {
576 static const List<bindings.StructDataHeader> kVersions = const [ 566 static const List<bindings.StructDataHeader> kVersions = const [
577 const bindings.StructDataHeader(16, 0) 567 const bindings.StructDataHeader(16, 0)
578 ]; 568 ];
579 types_mojom.Error error = null; 569 types_mojom.Error error = null;
580 int exitStatus = 0; 570 int exitStatus = 0;
581 571
582 ProcessControllerWaitResponseParams() : super(kVersions.last.size); 572 ProcessControllerWaitResponseParams() : super(kVersions.last.size);
583 573
584 static ProcessControllerWaitResponseParams deserialize(bindings.Message messag e) { 574 static ProcessControllerWaitResponseParams deserialize(bindings.Message messag e) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 645
656 Map toJson() { 646 Map toJson() {
657 Map map = new Map(); 647 Map map = new Map();
658 map["error"] = error; 648 map["error"] = error;
659 map["exitStatus"] = exitStatus; 649 map["exitStatus"] = exitStatus;
660 return map; 650 return map;
661 } 651 }
662 } 652 }
663 653
664 654
665
666
667 class _ProcessControllerKillParams extends bindings.Struct { 655 class _ProcessControllerKillParams extends bindings.Struct {
668 static const List<bindings.StructDataHeader> kVersions = const [ 656 static const List<bindings.StructDataHeader> kVersions = const [
669 const bindings.StructDataHeader(16, 0) 657 const bindings.StructDataHeader(16, 0)
670 ]; 658 ];
671 int signal = 0; 659 int signal = 0;
672 660
673 _ProcessControllerKillParams() : super(kVersions.last.size); 661 _ProcessControllerKillParams() : super(kVersions.last.size);
674 662
675 static _ProcessControllerKillParams deserialize(bindings.Message message) { 663 static _ProcessControllerKillParams deserialize(bindings.Message message) {
676 var decoder = new bindings.Decoder(message); 664 var decoder = new bindings.Decoder(message);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 } 717 }
730 718
731 Map toJson() { 719 Map toJson() {
732 Map map = new Map(); 720 Map map = new Map();
733 map["signal"] = signal; 721 map["signal"] = signal;
734 return map; 722 return map;
735 } 723 }
736 } 724 }
737 725
738 726
739
740
741 class ProcessControllerKillResponseParams extends bindings.Struct { 727 class ProcessControllerKillResponseParams extends bindings.Struct {
742 static const List<bindings.StructDataHeader> kVersions = const [ 728 static const List<bindings.StructDataHeader> kVersions = const [
743 const bindings.StructDataHeader(16, 0) 729 const bindings.StructDataHeader(16, 0)
744 ]; 730 ];
745 types_mojom.Error error = null; 731 types_mojom.Error error = null;
746 732
747 ProcessControllerKillResponseParams() : super(kVersions.last.size); 733 ProcessControllerKillResponseParams() : super(kVersions.last.size);
748 734
749 static ProcessControllerKillResponseParams deserialize(bindings.Message messag e) { 735 static ProcessControllerKillResponseParams deserialize(bindings.Message messag e) {
750 var decoder = new bindings.Decoder(message); 736 var decoder = new bindings.Decoder(message);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 "error: $error" ")"; 792 "error: $error" ")";
807 } 793 }
808 794
809 Map toJson() { 795 Map toJson() {
810 Map map = new Map(); 796 Map map = new Map();
811 map["error"] = error; 797 map["error"] = error;
812 return map; 798 return map;
813 } 799 }
814 } 800 }
815 801
816
817
818
819 const int _Process_spawnName = 0; 802 const int _Process_spawnName = 0;
820 const int _Process_spawnWithTerminalName = 1; 803 const int _Process_spawnWithTerminalName = 1;
821 804
822
823
824 class _ProcessServiceDescription implements service_describer.ServiceDescription { 805 class _ProcessServiceDescription implements service_describer.ServiceDescription {
825 dynamic getTopLevelInterface([Function responseFactory]) => 806 dynamic getTopLevelInterface([Function responseFactory]) =>
826 responseFactory(null); 807 responseFactory(null);
827 808
828 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 809 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
829 responseFactory(null); 810 responseFactory(null);
830 811
831 dynamic getAllTypeDefinitions([Function responseFactory]) => 812 dynamic getAllTypeDefinitions([Function responseFactory]) =>
832 responseFactory(null); 813 responseFactory(null);
833 } 814 }
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1114 if (_cachedServiceDescription == null) { 1095 if (_cachedServiceDescription == null) {
1115 _cachedServiceDescription = new _ProcessServiceDescription(); 1096 _cachedServiceDescription = new _ProcessServiceDescription();
1116 } 1097 }
1117 return _cachedServiceDescription; 1098 return _cachedServiceDescription;
1118 } 1099 }
1119 } 1100 }
1120 1101
1121 const int _ProcessController_waitName = 0; 1102 const int _ProcessController_waitName = 0;
1122 const int _ProcessController_killName = 1; 1103 const int _ProcessController_killName = 1;
1123 1104
1124
1125
1126 class _ProcessControllerServiceDescription implements service_describer.ServiceD escription { 1105 class _ProcessControllerServiceDescription implements service_describer.ServiceD escription {
1127 dynamic getTopLevelInterface([Function responseFactory]) => 1106 dynamic getTopLevelInterface([Function responseFactory]) =>
1128 responseFactory(null); 1107 responseFactory(null);
1129 1108
1130 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) => 1109 dynamic getTypeDefinition(String typeKey, [Function responseFactory]) =>
1131 responseFactory(null); 1110 responseFactory(null);
1132 1111
1133 dynamic getAllTypeDefinitions([Function responseFactory]) => 1112 dynamic getAllTypeDefinitions([Function responseFactory]) =>
1134 responseFactory(null); 1113 responseFactory(null);
1135 } 1114 }
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
1403 static service_describer.ServiceDescription get serviceDescription { 1382 static service_describer.ServiceDescription get serviceDescription {
1404 if (_cachedServiceDescription == null) { 1383 if (_cachedServiceDescription == null) {
1405 _cachedServiceDescription = new _ProcessControllerServiceDescription(); 1384 _cachedServiceDescription = new _ProcessControllerServiceDescription();
1406 } 1385 }
1407 return _cachedServiceDescription; 1386 return _cachedServiceDescription;
1408 } 1387 }
1409 } 1388 }
1410 1389
1411 1390
1412 1391
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698