| 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 module mojo.shell.mojom; | 5 module mojo.shell.mojom; |
| 6 | 6 |
| 7 import "mojo/shell/public/interfaces/capabilities.mojom"; | 7 import "mojo/shell/public/interfaces/capabilities.mojom"; |
| 8 import "mojo/shell/public/interfaces/connector.mojom"; | 8 import "mojo/shell/public/interfaces/connector.mojom"; |
| 9 import "mojo/shell/public/interfaces/interface_provider.mojom"; | 9 import "mojo/shell/public/interfaces/interface_provider.mojom"; |
| 10 | 10 |
| 11 // Implemented by something "known to" the Mojo Shell (e.g. an application or | 11 // Implemented by something "known to" the Mojo Shell (e.g. an application or |
| 12 // service), for which an instance is tracked. It allows the implementor to | 12 // service), for which an instance is tracked. It allows the implementor to |
| 13 // receive lifecycle events and service inbound connection attempts. | 13 // receive lifecycle events and service inbound connection attempts. |
| 14 interface ShellClient { | 14 interface ShellClient { |
| 15 // Called by the shell once an instance for this application has been created. | 15 // Called by the shell once an instance for this application has been created. |
| 16 // This method will be called exactly once before any other method is called. | 16 // This method will be called exactly once before any other method is called. |
| 17 // | 17 // |
| 18 // Parameters: | 18 // Parameters: |
| 19 // | 19 // |
| 20 // connector | |
| 21 // An interface back to the shell by which new connections may be | |
| 22 // established. | |
| 23 // | |
| 24 // identity | 20 // identity |
| 25 // The identity of this instance in the shell. Includes: | 21 // The identity of this instance in the shell. Includes: |
| 26 // * The resolved name used in the connection request that resulted in this | 22 // * The resolved name used in the connection request that resulted in this |
| 27 // instance being initialized. | 23 // instance being initialized. |
| 28 // * The user associated with this instance in the shell. This will never | 24 // * The user associated with this instance in the shell. This will never |
| 29 // be kInheritUserID. | 25 // be kInheritUserID. |
| 30 // * The instance group this instance belongs to. | 26 // * The instance group this instance belongs to. |
| 31 // | 27 // |
| 32 // id | 28 // id |
| 33 // A unique identifier used by the shell to identify this instance. | 29 // A unique identifier used by the shell to identify this instance. |
| 34 // | 30 // |
| 35 Initialize(Connector connector, Identity identity, uint32 id); | 31 // |
| 32 // Response parameters: |
| 33 // |
| 34 // connector_request |
| 35 // An optional Connector request for the shell to bind, allowing the |
| 36 // initialized client to connect to others. |
| 37 // |
| 38 Initialize(Identity identity, uint32 id) => (Connector&? connector_request); |
| 36 | 39 |
| 37 // Called when another application attempts to open a connection to this | 40 // Called when another application attempts to open a connection to this |
| 38 // application. An application implements this method to complete the exchange | 41 // application. An application implements this method to complete the exchange |
| 39 // of interface implementations with the remote application. See also | 42 // of interface implementations with the remote application. See also |
| 40 // documentation in shell.mojom for Connect(). The application originating | 43 // documentation in shell.mojom for Connect(). The application originating |
| 41 // the request is referred to as the "source" and the one receiving the | 44 // the request is referred to as the "source" and the one receiving the |
| 42 // "target". | 45 // "target". |
| 43 // | 46 // |
| 44 // Parameters: | 47 // Parameters: |
| 45 // | 48 // |
| (...skipping 20 matching lines...) Expand all Loading... |
| 66 // resolved_name | 69 // resolved_name |
| 67 // The resolved name used to complete this connection. | 70 // The resolved name used to complete this connection. |
| 68 // | 71 // |
| 69 AcceptConnection(Identity source, | 72 AcceptConnection(Identity source, |
| 70 uint32 source_id, | 73 uint32 source_id, |
| 71 InterfaceProvider&? local_interfaces, | 74 InterfaceProvider&? local_interfaces, |
| 72 InterfaceProvider? remote_interfaces, | 75 InterfaceProvider? remote_interfaces, |
| 73 CapabilityRequest allowed_capabilities, | 76 CapabilityRequest allowed_capabilities, |
| 74 string resolved_name); | 77 string resolved_name); |
| 75 }; | 78 }; |
| OLD | NEW |