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 process_mojom; | 5 library process_mojom; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:collection'; |
8 | 9 |
9 import 'package:mojo/bindings.dart' as bindings; | 10 import 'package:mojo/bindings.dart' as bindings; |
10 import 'package:mojo/core.dart' as core; | 11 import 'package:mojo/core.dart' as core; |
| 12 import 'package:mojo/mojo/bindings/types/mojom_types.mojom.dart' as mojom_types; |
| 13 import 'package:mojo/mojo/bindings/types/service_describer.mojom.dart' as servic
e_describer; |
11 import 'package:mojo_services/mojo/files/file.mojom.dart' as file_mojom; | 14 import 'package:mojo_services/mojo/files/file.mojom.dart' as file_mojom; |
12 import 'package:mojo_services/mojo/files/types.mojom.dart' as types_mojom; | 15 import 'package:mojo_services/mojo/files/types.mojom.dart' as types_mojom; |
13 | 16 |
14 | 17 |
15 | 18 |
16 class _ProcessSpawnParams extends bindings.Struct { | 19 class _ProcessSpawnParams extends bindings.Struct { |
17 static const List<bindings.StructDataHeader> kVersions = const [ | 20 static const List<bindings.StructDataHeader> kVersions = const [ |
18 const bindings.StructDataHeader(64, 0) | 21 const bindings.StructDataHeader(64, 0) |
19 ]; | 22 ]; |
20 List<int> path = null; | 23 List<int> path = null; |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 "stdoutFile: $stdoutFile" ", " | 157 "stdoutFile: $stdoutFile" ", " |
155 "stderrFile: $stderrFile" ", " | 158 "stderrFile: $stderrFile" ", " |
156 "processController: $processController" ")"; | 159 "processController: $processController" ")"; |
157 } | 160 } |
158 | 161 |
159 Map toJson() { | 162 Map toJson() { |
160 throw new bindings.MojoCodecError( | 163 throw new bindings.MojoCodecError( |
161 'Object containing handles cannot be encoded to JSON.'); | 164 'Object containing handles cannot be encoded to JSON.'); |
162 } | 165 } |
163 } | 166 } |
| 167 mojom_types.MojomStruct _process_Process_Spawn_Params__() { |
| 168 return new mojom_types.MojomStruct() |
| 169 ..declData = (new mojom_types.DeclarationData() |
| 170 ..shortName = '_ProcessSpawnParams' |
| 171 ..fullIdentifier = 'native_support._ProcessSpawnParams') |
| 172 ..fields = <mojom_types.StructField>[ |
| 173 new mojom_types.StructField() |
| 174 ..declData = (new mojom_types.DeclarationData()..shortName = 'Path') |
| 175 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType
() |
| 176 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType
.uint8))), |
| 177 |
| 178 new mojom_types.StructField() |
| 179 ..declData = (new mojom_types.DeclarationData()..shortName = 'Argv') |
| 180 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType
() |
| 181 ..nullable = true |
| 182 |
| 183 ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayT
ype() |
| 184 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType
.uint8))))), |
| 185 |
| 186 new mojom_types.StructField() |
| 187 ..declData = (new mojom_types.DeclarationData()..shortName = 'Envp') |
| 188 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType
() |
| 189 ..nullable = true |
| 190 |
| 191 ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayT
ype() |
| 192 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType
.uint8))))), |
| 193 |
| 194 new mojom_types.StructField() |
| 195 ..declData = (new mojom_types.DeclarationData()..shortName = 'StdinFile'
) |
| 196 ..type = (new mojom_types.Type() |
| 197 ..typeReference = (new mojom_types.TypeReference() |
| 198 ..nullable = true |
| 199 |
| 200 |
| 201 ..identifier = '_file_File__' |
| 202 ..typeKey = '_file_File__' |
| 203 )), |
| 204 |
| 205 new mojom_types.StructField() |
| 206 ..declData = (new mojom_types.DeclarationData()..shortName = 'StdoutFile
') |
| 207 ..type = (new mojom_types.Type() |
| 208 ..typeReference = (new mojom_types.TypeReference() |
| 209 ..nullable = true |
| 210 |
| 211 |
| 212 ..identifier = '_file_File__' |
| 213 ..typeKey = '_file_File__' |
| 214 )), |
| 215 |
| 216 new mojom_types.StructField() |
| 217 ..declData = (new mojom_types.DeclarationData()..shortName = 'StderrFile
') |
| 218 ..type = (new mojom_types.Type() |
| 219 ..typeReference = (new mojom_types.TypeReference() |
| 220 ..nullable = true |
| 221 |
| 222 |
| 223 ..identifier = '_file_File__' |
| 224 ..typeKey = '_file_File__' |
| 225 )), |
| 226 |
| 227 new mojom_types.StructField() |
| 228 ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessCon
troller') |
| 229 ..type = (new mojom_types.Type() |
| 230 ..typeReference = (new mojom_types.TypeReference() |
| 231 |
| 232 ..isInterfaceRequest = true |
| 233 ..identifier = '_process_ProcessController__' |
| 234 ..typeKey = '_process_ProcessController__' |
| 235 )), |
| 236 ]; |
| 237 } |
164 | 238 |
165 | 239 |
166 class ProcessSpawnResponseParams extends bindings.Struct { | 240 class ProcessSpawnResponseParams extends bindings.Struct { |
167 static const List<bindings.StructDataHeader> kVersions = const [ | 241 static const List<bindings.StructDataHeader> kVersions = const [ |
168 const bindings.StructDataHeader(16, 0) | 242 const bindings.StructDataHeader(16, 0) |
169 ]; | 243 ]; |
170 types_mojom.Error error = null; | 244 types_mojom.Error error = null; |
171 | 245 |
172 ProcessSpawnResponseParams() : super(kVersions.last.size); | 246 ProcessSpawnResponseParams() : super(kVersions.last.size); |
173 | 247 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 return "ProcessSpawnResponseParams(" | 299 return "ProcessSpawnResponseParams(" |
226 "error: $error" ")"; | 300 "error: $error" ")"; |
227 } | 301 } |
228 | 302 |
229 Map toJson() { | 303 Map toJson() { |
230 Map map = new Map(); | 304 Map map = new Map(); |
231 map["error"] = error; | 305 map["error"] = error; |
232 return map; | 306 return map; |
233 } | 307 } |
234 } | 308 } |
| 309 mojom_types.MojomStruct _process_Process_Spawn_ResponseParams__() { |
| 310 return new mojom_types.MojomStruct() |
| 311 ..declData = (new mojom_types.DeclarationData() |
| 312 ..shortName = 'ProcessSpawnResponseParams' |
| 313 ..fullIdentifier = 'native_support.ProcessSpawnResponseParams') |
| 314 ..fields = <mojom_types.StructField>[ |
| 315 new mojom_types.StructField() |
| 316 ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
| 317 ..type = (new mojom_types.Type() |
| 318 ..typeReference = (new mojom_types.TypeReference() |
| 319 |
| 320 ..identifier = '_types_Error__' |
| 321 ..typeKey = '_types_Error__' |
| 322 )), |
| 323 ]; |
| 324 } |
235 | 325 |
236 | 326 |
237 class _ProcessSpawnWithTerminalParams extends bindings.Struct { | 327 class _ProcessSpawnWithTerminalParams extends bindings.Struct { |
238 static const List<bindings.StructDataHeader> kVersions = const [ | 328 static const List<bindings.StructDataHeader> kVersions = const [ |
239 const bindings.StructDataHeader(48, 0) | 329 const bindings.StructDataHeader(48, 0) |
240 ]; | 330 ]; |
241 List<int> path = null; | 331 List<int> path = null; |
242 List<List<int>> argv = null; | 332 List<List<int>> argv = null; |
243 List<List<int>> envp = null; | 333 List<List<int>> envp = null; |
244 Object terminalFile = null; | 334 Object terminalFile = null; |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 "envp: $envp" ", " | 449 "envp: $envp" ", " |
360 "terminalFile: $terminalFile" ", " | 450 "terminalFile: $terminalFile" ", " |
361 "processController: $processController" ")"; | 451 "processController: $processController" ")"; |
362 } | 452 } |
363 | 453 |
364 Map toJson() { | 454 Map toJson() { |
365 throw new bindings.MojoCodecError( | 455 throw new bindings.MojoCodecError( |
366 'Object containing handles cannot be encoded to JSON.'); | 456 'Object containing handles cannot be encoded to JSON.'); |
367 } | 457 } |
368 } | 458 } |
| 459 mojom_types.MojomStruct _process_Process_SpawnWithTerminal_Params__() { |
| 460 return new mojom_types.MojomStruct() |
| 461 ..declData = (new mojom_types.DeclarationData() |
| 462 ..shortName = '_ProcessSpawnWithTerminalParams' |
| 463 ..fullIdentifier = 'native_support._ProcessSpawnWithTerminalParams') |
| 464 ..fields = <mojom_types.StructField>[ |
| 465 new mojom_types.StructField() |
| 466 ..declData = (new mojom_types.DeclarationData()..shortName = 'Path') |
| 467 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType
() |
| 468 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType
.uint8))), |
| 469 |
| 470 new mojom_types.StructField() |
| 471 ..declData = (new mojom_types.DeclarationData()..shortName = 'Argv') |
| 472 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType
() |
| 473 ..nullable = true |
| 474 |
| 475 ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayT
ype() |
| 476 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType
.uint8))))), |
| 477 |
| 478 new mojom_types.StructField() |
| 479 ..declData = (new mojom_types.DeclarationData()..shortName = 'Envp') |
| 480 ..type = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayType
() |
| 481 ..nullable = true |
| 482 |
| 483 ..elementType = (new mojom_types.Type()..arrayType = (new mojom_types.ArrayT
ype() |
| 484 ..elementType = (new mojom_types.Type()..simpleType = mojom_types.SimpleType
.uint8))))), |
| 485 |
| 486 new mojom_types.StructField() |
| 487 ..declData = (new mojom_types.DeclarationData()..shortName = 'TerminalFi
le') |
| 488 ..type = (new mojom_types.Type() |
| 489 ..typeReference = (new mojom_types.TypeReference() |
| 490 |
| 491 ..identifier = '_file_File__' |
| 492 ..typeKey = '_file_File__' |
| 493 )), |
| 494 |
| 495 new mojom_types.StructField() |
| 496 ..declData = (new mojom_types.DeclarationData()..shortName = 'ProcessCon
troller') |
| 497 ..type = (new mojom_types.Type() |
| 498 ..typeReference = (new mojom_types.TypeReference() |
| 499 |
| 500 ..isInterfaceRequest = true |
| 501 ..identifier = '_process_ProcessController__' |
| 502 ..typeKey = '_process_ProcessController__' |
| 503 )), |
| 504 ]; |
| 505 } |
369 | 506 |
370 | 507 |
371 class ProcessSpawnWithTerminalResponseParams extends bindings.Struct { | 508 class ProcessSpawnWithTerminalResponseParams extends bindings.Struct { |
372 static const List<bindings.StructDataHeader> kVersions = const [ | 509 static const List<bindings.StructDataHeader> kVersions = const [ |
373 const bindings.StructDataHeader(16, 0) | 510 const bindings.StructDataHeader(16, 0) |
374 ]; | 511 ]; |
375 types_mojom.Error error = null; | 512 types_mojom.Error error = null; |
376 | 513 |
377 ProcessSpawnWithTerminalResponseParams() : super(kVersions.last.size); | 514 ProcessSpawnWithTerminalResponseParams() : super(kVersions.last.size); |
378 | 515 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 return "ProcessSpawnWithTerminalResponseParams(" | 567 return "ProcessSpawnWithTerminalResponseParams(" |
431 "error: $error" ")"; | 568 "error: $error" ")"; |
432 } | 569 } |
433 | 570 |
434 Map toJson() { | 571 Map toJson() { |
435 Map map = new Map(); | 572 Map map = new Map(); |
436 map["error"] = error; | 573 map["error"] = error; |
437 return map; | 574 return map; |
438 } | 575 } |
439 } | 576 } |
| 577 mojom_types.MojomStruct _process_Process_SpawnWithTerminal_ResponseParams__() { |
| 578 return new mojom_types.MojomStruct() |
| 579 ..declData = (new mojom_types.DeclarationData() |
| 580 ..shortName = 'ProcessSpawnWithTerminalResponseParams' |
| 581 ..fullIdentifier = 'native_support.ProcessSpawnWithTerminalResponseParams'
) |
| 582 ..fields = <mojom_types.StructField>[ |
| 583 new mojom_types.StructField() |
| 584 ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
| 585 ..type = (new mojom_types.Type() |
| 586 ..typeReference = (new mojom_types.TypeReference() |
| 587 |
| 588 ..identifier = '_types_Error__' |
| 589 ..typeKey = '_types_Error__' |
| 590 )), |
| 591 ]; |
| 592 } |
440 | 593 |
441 | 594 |
442 class _ProcessControllerWaitParams extends bindings.Struct { | 595 class _ProcessControllerWaitParams extends bindings.Struct { |
443 static const List<bindings.StructDataHeader> kVersions = const [ | 596 static const List<bindings.StructDataHeader> kVersions = const [ |
444 const bindings.StructDataHeader(8, 0) | 597 const bindings.StructDataHeader(8, 0) |
445 ]; | 598 ]; |
446 | 599 |
447 _ProcessControllerWaitParams() : super(kVersions.last.size); | 600 _ProcessControllerWaitParams() : super(kVersions.last.size); |
448 | 601 |
449 static _ProcessControllerWaitParams deserialize(bindings.Message message) { | 602 static _ProcessControllerWaitParams deserialize(bindings.Message message) { |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
488 | 641 |
489 String toString() { | 642 String toString() { |
490 return "_ProcessControllerWaitParams("")"; | 643 return "_ProcessControllerWaitParams("")"; |
491 } | 644 } |
492 | 645 |
493 Map toJson() { | 646 Map toJson() { |
494 Map map = new Map(); | 647 Map map = new Map(); |
495 return map; | 648 return map; |
496 } | 649 } |
497 } | 650 } |
| 651 mojom_types.MojomStruct _process_ProcessController_Wait_Params__() { |
| 652 return new mojom_types.MojomStruct() |
| 653 ..declData = (new mojom_types.DeclarationData() |
| 654 ..shortName = '_ProcessControllerWaitParams' |
| 655 ..fullIdentifier = 'native_support._ProcessControllerWaitParams') |
| 656 ..fields = <mojom_types.StructField>[]; |
| 657 } |
498 | 658 |
499 | 659 |
500 class ProcessControllerWaitResponseParams extends bindings.Struct { | 660 class ProcessControllerWaitResponseParams extends bindings.Struct { |
501 static const List<bindings.StructDataHeader> kVersions = const [ | 661 static const List<bindings.StructDataHeader> kVersions = const [ |
502 const bindings.StructDataHeader(16, 0) | 662 const bindings.StructDataHeader(16, 0) |
503 ]; | 663 ]; |
504 types_mojom.Error error = null; | 664 types_mojom.Error error = null; |
505 int exitStatus = 0; | 665 int exitStatus = 0; |
506 | 666 |
507 ProcessControllerWaitResponseParams() : super(kVersions.last.size); | 667 ProcessControllerWaitResponseParams() : super(kVersions.last.size); |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
568 "exitStatus: $exitStatus" ")"; | 728 "exitStatus: $exitStatus" ")"; |
569 } | 729 } |
570 | 730 |
571 Map toJson() { | 731 Map toJson() { |
572 Map map = new Map(); | 732 Map map = new Map(); |
573 map["error"] = error; | 733 map["error"] = error; |
574 map["exitStatus"] = exitStatus; | 734 map["exitStatus"] = exitStatus; |
575 return map; | 735 return map; |
576 } | 736 } |
577 } | 737 } |
| 738 mojom_types.MojomStruct _process_ProcessController_Wait_ResponseParams__() { |
| 739 return new mojom_types.MojomStruct() |
| 740 ..declData = (new mojom_types.DeclarationData() |
| 741 ..shortName = 'ProcessControllerWaitResponseParams' |
| 742 ..fullIdentifier = 'native_support.ProcessControllerWaitResponseParams') |
| 743 ..fields = <mojom_types.StructField>[ |
| 744 new mojom_types.StructField() |
| 745 ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
| 746 ..type = (new mojom_types.Type() |
| 747 ..typeReference = (new mojom_types.TypeReference() |
| 748 |
| 749 ..identifier = '_types_Error__' |
| 750 ..typeKey = '_types_Error__' |
| 751 )), |
| 752 |
| 753 new mojom_types.StructField() |
| 754 ..declData = (new mojom_types.DeclarationData()..shortName = 'ExitStatus
') |
| 755 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.in
t32), |
| 756 ]; |
| 757 } |
578 | 758 |
579 | 759 |
580 class _ProcessControllerKillParams extends bindings.Struct { | 760 class _ProcessControllerKillParams extends bindings.Struct { |
581 static const List<bindings.StructDataHeader> kVersions = const [ | 761 static const List<bindings.StructDataHeader> kVersions = const [ |
582 const bindings.StructDataHeader(16, 0) | 762 const bindings.StructDataHeader(16, 0) |
583 ]; | 763 ]; |
584 int signal = 0; | 764 int signal = 0; |
585 | 765 |
586 _ProcessControllerKillParams() : super(kVersions.last.size); | 766 _ProcessControllerKillParams() : super(kVersions.last.size); |
587 | 767 |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 return "_ProcessControllerKillParams(" | 815 return "_ProcessControllerKillParams(" |
636 "signal: $signal" ")"; | 816 "signal: $signal" ")"; |
637 } | 817 } |
638 | 818 |
639 Map toJson() { | 819 Map toJson() { |
640 Map map = new Map(); | 820 Map map = new Map(); |
641 map["signal"] = signal; | 821 map["signal"] = signal; |
642 return map; | 822 return map; |
643 } | 823 } |
644 } | 824 } |
| 825 mojom_types.MojomStruct _process_ProcessController_Kill_Params__() { |
| 826 return new mojom_types.MojomStruct() |
| 827 ..declData = (new mojom_types.DeclarationData() |
| 828 ..shortName = '_ProcessControllerKillParams' |
| 829 ..fullIdentifier = 'native_support._ProcessControllerKillParams') |
| 830 ..fields = <mojom_types.StructField>[ |
| 831 new mojom_types.StructField() |
| 832 ..declData = (new mojom_types.DeclarationData()..shortName = 'Signal') |
| 833 ..type = (new mojom_types.Type()..simpleType = mojom_types.SimpleType.in
t32), |
| 834 ]; |
| 835 } |
645 | 836 |
646 | 837 |
647 class ProcessControllerKillResponseParams extends bindings.Struct { | 838 class ProcessControllerKillResponseParams extends bindings.Struct { |
648 static const List<bindings.StructDataHeader> kVersions = const [ | 839 static const List<bindings.StructDataHeader> kVersions = const [ |
649 const bindings.StructDataHeader(16, 0) | 840 const bindings.StructDataHeader(16, 0) |
650 ]; | 841 ]; |
651 types_mojom.Error error = null; | 842 types_mojom.Error error = null; |
652 | 843 |
653 ProcessControllerKillResponseParams() : super(kVersions.last.size); | 844 ProcessControllerKillResponseParams() : super(kVersions.last.size); |
654 | 845 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 return "ProcessControllerKillResponseParams(" | 897 return "ProcessControllerKillResponseParams(" |
707 "error: $error" ")"; | 898 "error: $error" ")"; |
708 } | 899 } |
709 | 900 |
710 Map toJson() { | 901 Map toJson() { |
711 Map map = new Map(); | 902 Map map = new Map(); |
712 map["error"] = error; | 903 map["error"] = error; |
713 return map; | 904 return map; |
714 } | 905 } |
715 } | 906 } |
| 907 mojom_types.MojomStruct _process_ProcessController_Kill_ResponseParams__() { |
| 908 return new mojom_types.MojomStruct() |
| 909 ..declData = (new mojom_types.DeclarationData() |
| 910 ..shortName = 'ProcessControllerKillResponseParams' |
| 911 ..fullIdentifier = 'native_support.ProcessControllerKillResponseParams') |
| 912 ..fields = <mojom_types.StructField>[ |
| 913 new mojom_types.StructField() |
| 914 ..declData = (new mojom_types.DeclarationData()..shortName = 'Error') |
| 915 ..type = (new mojom_types.Type() |
| 916 ..typeReference = (new mojom_types.TypeReference() |
| 917 |
| 918 ..identifier = '_types_Error__' |
| 919 ..typeKey = '_types_Error__' |
| 920 )), |
| 921 ]; |
| 922 } |
| 923 |
716 | 924 |
717 const int _Process_spawnName = 0; | 925 const int _Process_spawnName = 0; |
718 const int _Process_spawnWithTerminalName = 1; | 926 const int _Process_spawnWithTerminalName = 1; |
719 | 927 |
| 928 mojom_types.MojomInterface _process_Process__() { |
| 929 return new mojom_types.MojomInterface() |
| 930 ..declData = (new mojom_types.DeclarationData() |
| 931 ..shortName = 'Process' |
| 932 ..fullIdentifier = 'native_support.Process') |
| 933 ..interfaceName = 'Process' |
| 934 ..methods = <int, mojom_types.MojomMethod>{ |
| 935 _Process_spawnName: new mojom_types.MojomMethod() |
| 936 ..declData = (new mojom_types.DeclarationData()..shortName = 'Spawn') |
| 937 ..ordinal = _Process_spawnName |
| 938 ..responseParams = _process_Process_Spawn_ResponseParams__()..parameters
= _process_Process_Spawn_Params__(),_Process_spawnWithTerminalName: new mojom_t
ypes.MojomMethod() |
| 939 ..declData = (new mojom_types.DeclarationData()..shortName = 'SpawnWithT
erminal') |
| 940 ..ordinal = _Process_spawnWithTerminalName |
| 941 ..responseParams = _process_Process_SpawnWithTerminal_ResponseParams__()
..parameters = _process_Process_SpawnWithTerminal_Params__(), |
| 942 }; |
| 943 } |
| 944 |
| 945 class _ProcessServiceDescription implements service_describer.ServiceDescription
{ |
| 946 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 947 return _process_Process__(); |
| 948 } |
| 949 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 950 return getAllMojomTypeDefinitions()[typeKey]; |
| 951 } |
| 952 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 953 return getAllMojomTypeDefinitions(); |
| 954 } |
| 955 } |
| 956 |
720 abstract class Process { | 957 abstract class Process { |
721 static const String serviceName = "native_support::Process"; | 958 static const String serviceName = "native_support::Process"; |
722 dynamic spawn(List<int> path,List<List<int>> argv,List<List<int>> envp,Object
stdinFile,Object stdoutFile,Object stderrFile,Object processController,[Function
responseFactory = null]); | 959 dynamic spawn(List<int> path,List<List<int>> argv,List<List<int>> envp,Object
stdinFile,Object stdoutFile,Object stderrFile,Object processController,[Function
responseFactory = null]); |
723 dynamic spawnWithTerminal(List<int> path,List<List<int>> argv,List<List<int>>
envp,Object terminalFile,Object processController,[Function responseFactory = nu
ll]); | 960 dynamic spawnWithTerminal(List<int> path,List<List<int>> argv,List<List<int>>
envp,Object terminalFile,Object processController,[Function responseFactory = nu
ll]); |
724 } | 961 } |
725 | 962 |
726 | 963 |
727 class _ProcessProxyImpl extends bindings.Proxy { | 964 class _ProcessProxyImpl extends bindings.Proxy { |
728 _ProcessProxyImpl.fromEndpoint( | 965 _ProcessProxyImpl.fromEndpoint( |
729 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 966 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
730 | 967 |
731 _ProcessProxyImpl.fromHandle(core.MojoHandle handle) : | 968 _ProcessProxyImpl.fromHandle(core.MojoHandle handle) : |
732 super.fromHandle(handle); | 969 super.fromHandle(handle); |
733 | 970 |
734 _ProcessProxyImpl.unbound() : super.unbound(); | 971 _ProcessProxyImpl.unbound() : super.unbound(); |
735 | 972 |
736 static _ProcessProxyImpl newFromEndpoint( | 973 static _ProcessProxyImpl newFromEndpoint( |
737 core.MojoMessagePipeEndpoint endpoint) { | 974 core.MojoMessagePipeEndpoint endpoint) { |
738 assert(endpoint.setDescription("For _ProcessProxyImpl")); | 975 assert(endpoint.setDescription("For _ProcessProxyImpl")); |
739 return new _ProcessProxyImpl.fromEndpoint(endpoint); | 976 return new _ProcessProxyImpl.fromEndpoint(endpoint); |
740 } | 977 } |
741 | 978 |
| 979 service_describer.ServiceDescription get serviceDescription => |
| 980 new _ProcessServiceDescription(); |
| 981 |
742 void handleResponse(bindings.ServiceMessage message) { | 982 void handleResponse(bindings.ServiceMessage message) { |
743 switch (message.header.type) { | 983 switch (message.header.type) { |
744 case _Process_spawnName: | 984 case _Process_spawnName: |
745 var r = ProcessSpawnResponseParams.deserialize( | 985 var r = ProcessSpawnResponseParams.deserialize( |
746 message.payload); | 986 message.payload); |
747 if (!message.header.hasRequestId) { | 987 if (!message.header.hasRequestId) { |
748 proxyError("Expected a message with a valid request Id."); | 988 proxyError("Expected a message with a valid request Id."); |
749 return; | 989 return; |
750 } | 990 } |
751 Completer c = completerMap[message.header.requestId]; | 991 Completer c = completerMap[message.header.requestId]; |
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
983 assert(_impl == null); | 1223 assert(_impl == null); |
984 _impl = d; | 1224 _impl = d; |
985 } | 1225 } |
986 | 1226 |
987 String toString() { | 1227 String toString() { |
988 var superString = super.toString(); | 1228 var superString = super.toString(); |
989 return "ProcessStub($superString)"; | 1229 return "ProcessStub($superString)"; |
990 } | 1230 } |
991 | 1231 |
992 int get version => 0; | 1232 int get version => 0; |
| 1233 |
| 1234 |
| 1235 service_describer.ServiceDescription get serviceDescription => |
| 1236 new _ProcessServiceDescription(); |
993 } | 1237 } |
994 | 1238 |
995 const int _ProcessController_waitName = 0; | 1239 const int _ProcessController_waitName = 0; |
996 const int _ProcessController_killName = 1; | 1240 const int _ProcessController_killName = 1; |
997 | 1241 |
| 1242 mojom_types.MojomInterface _process_ProcessController__() { |
| 1243 return new mojom_types.MojomInterface() |
| 1244 ..declData = (new mojom_types.DeclarationData() |
| 1245 ..shortName = 'ProcessController' |
| 1246 ..fullIdentifier = 'native_support.ProcessController') |
| 1247 ..interfaceName = 'ProcessController' |
| 1248 ..methods = <int, mojom_types.MojomMethod>{ |
| 1249 _ProcessController_waitName: new mojom_types.MojomMethod() |
| 1250 ..declData = (new mojom_types.DeclarationData()..shortName = 'Wait') |
| 1251 ..ordinal = _ProcessController_waitName |
| 1252 ..responseParams = _process_ProcessController_Wait_ResponseParams__()..p
arameters = _process_ProcessController_Wait_Params__(),_ProcessController_killNa
me: new mojom_types.MojomMethod() |
| 1253 ..declData = (new mojom_types.DeclarationData()..shortName = 'Kill') |
| 1254 ..ordinal = _ProcessController_killName |
| 1255 ..responseParams = _process_ProcessController_Kill_ResponseParams__()..p
arameters = _process_ProcessController_Kill_Params__(), |
| 1256 }; |
| 1257 } |
| 1258 |
| 1259 class _ProcessControllerServiceDescription implements service_describer.ServiceD
escription { |
| 1260 dynamic getTopLevelInterface([Function responseFactory = null]) { |
| 1261 return _process_ProcessController__(); |
| 1262 } |
| 1263 dynamic getTypeDefinition(String typeKey,[Function responseFactory = null]) { |
| 1264 return getAllMojomTypeDefinitions()[typeKey]; |
| 1265 } |
| 1266 dynamic getAllTypeDefinitions([Function responseFactory = null]) { |
| 1267 return getAllMojomTypeDefinitions(); |
| 1268 } |
| 1269 } |
| 1270 |
998 abstract class ProcessController { | 1271 abstract class ProcessController { |
999 static const String serviceName = null; | 1272 static const String serviceName = null; |
1000 dynamic wait([Function responseFactory = null]); | 1273 dynamic wait([Function responseFactory = null]); |
1001 dynamic kill(int signal,[Function responseFactory = null]); | 1274 dynamic kill(int signal,[Function responseFactory = null]); |
1002 } | 1275 } |
1003 | 1276 |
1004 | 1277 |
1005 class _ProcessControllerProxyImpl extends bindings.Proxy { | 1278 class _ProcessControllerProxyImpl extends bindings.Proxy { |
1006 _ProcessControllerProxyImpl.fromEndpoint( | 1279 _ProcessControllerProxyImpl.fromEndpoint( |
1007 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); | 1280 core.MojoMessagePipeEndpoint endpoint) : super.fromEndpoint(endpoint); |
1008 | 1281 |
1009 _ProcessControllerProxyImpl.fromHandle(core.MojoHandle handle) : | 1282 _ProcessControllerProxyImpl.fromHandle(core.MojoHandle handle) : |
1010 super.fromHandle(handle); | 1283 super.fromHandle(handle); |
1011 | 1284 |
1012 _ProcessControllerProxyImpl.unbound() : super.unbound(); | 1285 _ProcessControllerProxyImpl.unbound() : super.unbound(); |
1013 | 1286 |
1014 static _ProcessControllerProxyImpl newFromEndpoint( | 1287 static _ProcessControllerProxyImpl newFromEndpoint( |
1015 core.MojoMessagePipeEndpoint endpoint) { | 1288 core.MojoMessagePipeEndpoint endpoint) { |
1016 assert(endpoint.setDescription("For _ProcessControllerProxyImpl")); | 1289 assert(endpoint.setDescription("For _ProcessControllerProxyImpl")); |
1017 return new _ProcessControllerProxyImpl.fromEndpoint(endpoint); | 1290 return new _ProcessControllerProxyImpl.fromEndpoint(endpoint); |
1018 } | 1291 } |
1019 | 1292 |
| 1293 service_describer.ServiceDescription get serviceDescription => |
| 1294 new _ProcessControllerServiceDescription(); |
| 1295 |
1020 void handleResponse(bindings.ServiceMessage message) { | 1296 void handleResponse(bindings.ServiceMessage message) { |
1021 switch (message.header.type) { | 1297 switch (message.header.type) { |
1022 case _ProcessController_waitName: | 1298 case _ProcessController_waitName: |
1023 var r = ProcessControllerWaitResponseParams.deserialize( | 1299 var r = ProcessControllerWaitResponseParams.deserialize( |
1024 message.payload); | 1300 message.payload); |
1025 if (!message.header.hasRequestId) { | 1301 if (!message.header.hasRequestId) { |
1026 proxyError("Expected a message with a valid request Id."); | 1302 proxyError("Expected a message with a valid request Id."); |
1027 return; | 1303 return; |
1028 } | 1304 } |
1029 Completer c = completerMap[message.header.requestId]; | 1305 Completer c = completerMap[message.header.requestId]; |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 assert(_impl == null); | 1527 assert(_impl == null); |
1252 _impl = d; | 1528 _impl = d; |
1253 } | 1529 } |
1254 | 1530 |
1255 String toString() { | 1531 String toString() { |
1256 var superString = super.toString(); | 1532 var superString = super.toString(); |
1257 return "ProcessControllerStub($superString)"; | 1533 return "ProcessControllerStub($superString)"; |
1258 } | 1534 } |
1259 | 1535 |
1260 int get version => 0; | 1536 int get version => 0; |
| 1537 |
| 1538 |
| 1539 service_describer.ServiceDescription get serviceDescription => |
| 1540 new _ProcessControllerServiceDescription(); |
1261 } | 1541 } |
1262 | 1542 |
1263 | 1543 |
| 1544 |
| 1545 |
| 1546 |
| 1547 |
| 1548 |
| 1549 Map<String, mojom_types.UserDefinedType> _initDescriptions() { |
| 1550 var map = new HashMap<String, mojom_types.UserDefinedType>(); |
| 1551 map["_process_Process_Spawn_Params__"] = |
| 1552 new mojom_types.UserDefinedType() |
| 1553 ..structType = _process_Process_Spawn_Params__(); |
| 1554 map["_process_Process_Spawn_ResponseParams__"] = |
| 1555 new mojom_types.UserDefinedType() |
| 1556 ..structType = _process_Process_Spawn_ResponseParams__(); |
| 1557 map["_process_Process_SpawnWithTerminal_Params__"] = |
| 1558 new mojom_types.UserDefinedType() |
| 1559 ..structType = _process_Process_SpawnWithTerminal_Params__(); |
| 1560 map["_process_Process_SpawnWithTerminal_ResponseParams__"] = |
| 1561 new mojom_types.UserDefinedType() |
| 1562 ..structType = _process_Process_SpawnWithTerminal_ResponseParams__(); |
| 1563 map["_process_ProcessController_Wait_Params__"] = |
| 1564 new mojom_types.UserDefinedType() |
| 1565 ..structType = _process_ProcessController_Wait_Params__(); |
| 1566 map["_process_ProcessController_Wait_ResponseParams__"] = |
| 1567 new mojom_types.UserDefinedType() |
| 1568 ..structType = _process_ProcessController_Wait_ResponseParams__(); |
| 1569 map["_process_ProcessController_Kill_Params__"] = |
| 1570 new mojom_types.UserDefinedType() |
| 1571 ..structType = _process_ProcessController_Kill_Params__(); |
| 1572 map["_process_ProcessController_Kill_ResponseParams__"] = |
| 1573 new mojom_types.UserDefinedType() |
| 1574 ..structType = _process_ProcessController_Kill_ResponseParams__(); |
| 1575 map["_process_Process__"] = |
| 1576 new mojom_types.UserDefinedType() |
| 1577 ..interfaceType = _process_Process__(); |
| 1578 map["_process_ProcessController__"] = |
| 1579 new mojom_types.UserDefinedType() |
| 1580 ..interfaceType = _process_ProcessController__(); |
| 1581 file_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefin
edType udt) { |
| 1582 map[s] = udt; |
| 1583 }); |
| 1584 types_mojom.getAllMojomTypeDefinitions().forEach((String s, mojom_types.UserDefi
nedType udt) { |
| 1585 map[s] = udt; |
| 1586 }); |
| 1587 |
| 1588 return map; |
| 1589 } |
| 1590 |
| 1591 var _MojomDesc; |
| 1592 Map<String, mojom_types.UserDefinedType> getAllMojomTypeDefinitions() { |
| 1593 if (_MojomDesc == null) { |
| 1594 _MojomDesc = _initDescriptions(); |
| 1595 } |
| 1596 return _MojomDesc; |
| 1597 } |
| 1598 |
OLD | NEW |