| 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 shell.mojom; | 5 module shell.mojom; |
| 6 | 6 |
| 7 import "services/shell/public/interfaces/capabilities.mojom"; | 7 import "services/shell/public/interfaces/capabilities.mojom"; |
| 8 import "services/shell/public/interfaces/connector.mojom"; | 8 import "services/shell/public/interfaces/connector.mojom"; |
| 9 import "services/shell/public/interfaces/interface_provider.mojom"; | 9 import "services/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 Service { |
| 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 // identity | 20 // identity |
| 21 // The identity of this instance in the shell. Includes: | 21 // The identity of this instance in the shell. Includes: |
| 22 // * 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 |
| 23 // instance being initialized. | 23 // instance being initialized. |
| 24 // * 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 |
| 25 // be kInheritUserID. | 25 // be kInheritUserID. |
| 26 // * The instance group this instance belongs to. | 26 // * The instance group this instance belongs to. |
| 27 // | 27 // |
| 28 // id | 28 // id |
| 29 // A unique identifier used by the shell to identify this instance. | 29 // A unique identifier used by the shell to identify this instance. |
| 30 // | 30 // |
| 31 // | 31 // |
| 32 // Response parameters: | 32 // Response parameters: |
| 33 // | 33 // |
| 34 // connector_request | 34 // connector_request |
| 35 // An optional Connector request for the shell to bind, allowing the | 35 // An optional Connector request for the shell to bind, allowing the |
| 36 // initialized client to connect to others. | 36 // initialized client to connect to others. |
| 37 // | 37 // |
| 38 Initialize(Identity identity, uint32 id) => (Connector&? connector_request); | 38 OnStart(Identity identity, uint32 id) => (Connector&? connector_request); |
| 39 | 39 |
| 40 // Called when another application attempts to open a connection to this | 40 // Called when another application attempts to open a connection to this |
| 41 // application. An application implements this method to complete the exchange | 41 // application. An application implements this method to complete the exchange |
| 42 // of interface implementations with the remote application. See also | 42 // of interface implementations with the remote application. See also |
| 43 // documentation in shell.mojom for Connect(). The application originating | 43 // documentation in shell.mojom for Connect(). The application originating |
| 44 // 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 |
| 45 // "target". | 45 // "target". |
| 46 // | 46 // |
| 47 // Parameters: | 47 // Parameters: |
| 48 // | 48 // |
| (...skipping 13 matching lines...) Expand all Loading... |
| 62 // | 62 // |
| 63 // allowed_interfaces | 63 // allowed_interfaces |
| 64 // A whitelist of interface names that should be exported to the source, | 64 // A whitelist of interface names that should be exported to the source, |
| 65 // according to the security policy described by the source and target's | 65 // according to the security policy described by the source and target's |
| 66 // manifests. Attempts to bind interfaces not in this whitelist must not be | 66 // manifests. Attempts to bind interfaces not in this whitelist must not be |
| 67 // fulfilled. | 67 // fulfilled. |
| 68 // | 68 // |
| 69 // resolved_name | 69 // resolved_name |
| 70 // The resolved name used to complete this connection. | 70 // The resolved name used to complete this connection. |
| 71 // | 71 // |
| 72 AcceptConnection(Identity source, | 72 OnConnect(Identity source, |
| 73 uint32 source_id, | 73 uint32 source_id, |
| 74 InterfaceProvider&? local_interfaces, | 74 InterfaceProvider&? local_interfaces, |
| 75 InterfaceProvider? remote_interfaces, | 75 InterfaceProvider? remote_interfaces, |
| 76 CapabilityRequest allowed_capabilities, | 76 CapabilityRequest allowed_capabilities, |
| 77 string resolved_name); | 77 string resolved_name); |
| 78 }; | 78 }; |
| OLD | NEW |