Doug Horn | 1427b6a | 2018-12-11 13:19:16 -0800 | [diff] [blame] | 1 | // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | library fuchsia.sys; |
| 6 | |
| 7 | // An interface for controlling an environment. |
| 8 | // |
| 9 | // Closing this interface implicitly kills the controlled environment unless |
| 10 | // the |Detach| method has been called. |
| 11 | // |
| 12 | // If the environment is destroyed, this interface will be closed. |
| 13 | // |
| 14 | // Typically obtained via |Environment.CreateNestedEnvironment|. |
| 15 | interface EnvironmentController { |
| 16 | // Terminates the environment. |
| 17 | // |
| 18 | // When an |Environment| is terminated, all applications launched |
| 19 | // in the environment (and in all transitively nested environments) are also |
| 20 | // killed. |
| 21 | 1: Kill() -> (); |
| 22 | |
| 23 | // Decouples the lifetime of the environment from this controller. |
| 24 | // |
| 25 | // After calling |Detach|, the environment will not be implicitly killed when |
| 26 | // this interface is closed. |
| 27 | 2: Detach(); |
| 28 | |
| 29 | // Event that is triggered when the environment is created. |
| 30 | 3: -> OnCreated(); |
| 31 | }; |