| 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/shell.mojom"; | 7 import "mojo/shell/public/interfaces/shell.mojom"; |
| 8 import "mojo/shell/public/interfaces/shell_client_factory.mojom"; |
| 8 | 9 |
| 9 struct InstanceInfo { | 10 struct InstanceInfo { |
| 10 uint32 id; | 11 uint32 id; |
| 11 string name; | 12 string name; |
| 12 string qualifier; | 13 string qualifier; |
| 13 uint32 pid; | 14 uint32 pid; |
| 14 }; | 15 }; |
| 15 | 16 |
| 16 // Implemented by a client that wishes to be informed when the list of running | 17 // Implemented by a client that wishes to be informed when the list of running |
| 17 // instances changes. | 18 // instances changes. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 39 // Implemented by an object in the application manager associated with a | 40 // Implemented by an object in the application manager associated with a |
| 40 // specific instance. Tells it the PID for a process launched by the client. | 41 // specific instance. Tells it the PID for a process launched by the client. |
| 41 // This interface is only available to callers of ApplicationManager:: | 42 // This interface is only available to callers of ApplicationManager:: |
| 42 // CreateInstanceForHandle(). | 43 // CreateInstanceForHandle(). |
| 43 interface PIDReceiver { | 44 interface PIDReceiver { |
| 44 SetPID(uint32 pid); | 45 SetPID(uint32 pid); |
| 45 }; | 46 }; |
| 46 | 47 |
| 47 interface ApplicationManager { | 48 interface ApplicationManager { |
| 48 // Instructs the ApplicationManager to create an instance for an existing | 49 // Instructs the ApplicationManager to create an instance for an existing |
| 49 // process at the other end of |channel|, and perform applicable | 50 // process at the other end of |factory|, and perform applicable |
| 50 // initialization. This assumes the target process will bind the other end of | 51 // initialization. |
| 51 // channel to an implementation of ChildController and bind an Application | 52 CreateInstanceForFactory(ShellClientFactory factory, |
| 52 // request there. | 53 string name, |
| 53 CreateInstanceForHandle(handle channel, | 54 CapabilityFilter filter, |
| 54 string name, | 55 PIDReceiver& pid_receiver); |
| 55 CapabilityFilter filter, | |
| 56 PIDReceiver& pid_receiver); | |
| 57 | 56 |
| 58 // The listener is removed when the |listener| pipe is closed. | 57 // The listener is removed when the |listener| pipe is closed. |
| 59 AddInstanceListener(InstanceListener listener); | 58 AddInstanceListener(InstanceListener listener); |
| 60 }; | 59 }; |
| OLD | NEW |