OLD | NEW |
| (Empty) |
1 // Copyright 2015 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 module mojo.shell.mojom; | |
6 | |
7 import "mojo/shell/public/interfaces/connector.mojom"; | |
8 | |
9 struct InstanceInfo { | |
10 uint32 id; | |
11 Identity identity; | |
12 uint32 pid; | |
13 }; | |
14 | |
15 // Implemented by a client that wishes to be informed when the list of running | |
16 // instances changes. | |
17 interface InstanceListener { | |
18 // Called once when the listener is added via Shell::AddInstanceListener() to | |
19 // provide the initial list of instances that the listener observes changes | |
20 // against. | |
21 SetExistingInstances(array<InstanceInfo> instances); | |
22 | |
23 // Called when the shell has started tracking an instance. This happens when | |
24 // the shell first handles a request to launch the instance, before any | |
25 // process is created for it. | |
26 InstanceCreated(InstanceInfo instance); | |
27 | |
28 // Called when the shell has stopped tracking an instance. (i.e. when it has | |
29 // ended/quit). | |
30 InstanceDestroyed(uint32 id); | |
31 | |
32 // Called when a pid is available for the instance. This could be because a | |
33 // process was created by the runner for it, or because an existing content | |
34 // handler process was assigned. | |
35 InstancePIDAvailable(uint32 id, uint32 pid); | |
36 }; | |
37 | |
38 interface Shell { | |
39 // The listener is removed when the |listener| pipe is closed. | |
40 AddInstanceListener(InstanceListener listener); | |
41 }; | |
OLD | NEW |