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