| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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 module mojo.shell.mojom; | 5 module mojo.shell.mojom; |
| 6 | 6 |
| 7 import "mojo/shell/public/interfaces/connector.mojom"; | 7 import "mojo/shell/public/interfaces/connector.mojom"; |
| 8 import "mojo/shell/public/interfaces/shell_client_factory.mojom"; | 8 import "mojo/shell/public/interfaces/shell_client_factory.mojom"; |
| 9 | 9 |
| 10 struct InstanceInfo { | 10 struct InstanceInfo { |
| 11 uint32 id; | 11 uint32 id; |
| 12 string name; | 12 Identity identity; |
| 13 string qualifier; | |
| 14 uint32 pid; | 13 uint32 pid; |
| 15 }; | 14 }; |
| 16 | 15 |
| 17 // Implemented by a client that wishes to be informed when the list of running | 16 // Implemented by a client that wishes to be informed when the list of running |
| 18 // instances changes. | 17 // instances changes. |
| 19 interface InstanceListener { | 18 interface InstanceListener { |
| 20 // Called once when the listener is added via Shell::AddInstanceListener() to | 19 // Called once when the listener is added via Shell::AddInstanceListener() to |
| 21 // provide the initial list of instances that the listener observes changes | 20 // provide the initial list of instances that the listener observes changes |
| 22 // against. | 21 // against. |
| 23 SetExistingInstances(array<InstanceInfo> instances); | 22 SetExistingInstances(array<InstanceInfo> instances); |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 | 59 |
| 61 interface Shell { | 60 interface Shell { |
| 62 // Instructs the Shell to create an instance for an existing process at the | 61 // Instructs the Shell to create an instance for an existing process at the |
| 63 // other end of |factory|, and perform applicable initialization. |user_id| is | 62 // other end of |factory|, and perform applicable initialization. |user_id| is |
| 64 // the user the instance should be created as. This is typically set to | 63 // the user the instance should be created as. This is typically set to |
| 65 // Connector::kUserInherit, unless the application has the ability to connect | 64 // Connector::kUserInherit, unless the application has the ability to connect |
| 66 // as other users. |result| passed in the response indicates (via a MojoResult | 65 // as other users. |result| passed in the response indicates (via a MojoResult |
| 67 // code, see connector.mojom for definitions) the status of the instance | 66 // code, see connector.mojom for definitions) the status of the instance |
| 68 // creation. | 67 // creation. |
| 69 CreateInstance(ShellClientFactory factory, | 68 CreateInstance(ShellClientFactory factory, |
| 70 string name, | 69 Identity target, |
| 71 string user_id, | |
| 72 CapabilityFilter filter, | 70 CapabilityFilter filter, |
| 73 PIDReceiver& pid_receiver) => (ConnectResult result); | 71 PIDReceiver& pid_receiver) => (ConnectResult result); |
| 74 | 72 |
| 75 // The listener is removed when the |listener| pipe is closed. | 73 // The listener is removed when the |listener| pipe is closed. |
| 76 AddInstanceListener(InstanceListener listener); | 74 AddInstanceListener(InstanceListener listener); |
| 77 }; | 75 }; |
| OLD | NEW |