| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 module mojo.shell.mojom; | |
| 6 | |
| 7 import "mojo/shell/public/interfaces/capabilities.mojom"; | |
| 8 import "mojo/shell/public/interfaces/connector.mojom"; | |
| 9 import "mojo/shell/public/interfaces/interface_provider.mojom"; | |
| 10 | |
| 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 | |
| 13 // receive lifecycle events and service inbound connection attempts. | |
| 14 interface ShellClient { | |
| 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. | |
| 17 // | |
| 18 // Parameters: | |
| 19 // | |
| 20 // identity | |
| 21 // The identity of this instance in the shell. Includes: | |
| 22 // * The resolved name used in the connection request that resulted in this | |
| 23 // instance being initialized. | |
| 24 // * The user associated with this instance in the shell. This will never | |
| 25 // be kInheritUserID. | |
| 26 // * The instance group this instance belongs to. | |
| 27 // | |
| 28 // id | |
| 29 // A unique identifier used by the shell to identify this instance. | |
| 30 // | |
| 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); | |
| 39 | |
| 40 // Called when another application attempts to open a connection to this | |
| 41 // application. An application implements this method to complete the exchange | |
| 42 // of interface implementations with the remote application. See also | |
| 43 // documentation in shell.mojom for Connect(). The application originating | |
| 44 // the request is referred to as the "source" and the one receiving the | |
| 45 // "target". | |
| 46 // | |
| 47 // Parameters: | |
| 48 // | |
| 49 // source | |
| 50 // The identity of the instance originating the connection. | |
| 51 // | |
| 52 // source_id | |
| 53 // A unique identifier used by the shell to identify the source instance. | |
| 54 // | |
| 55 // local_interfaces | |
| 56 // A request for an InterfaceProvider by which the source application may | |
| 57 // seek to bind interface implementations exported by the target. | |
| 58 // | |
| 59 // remote_interfaces | |
| 60 // An InterfaceProvider by which the target application may bind interface | |
| 61 // implementations exported by the source. | |
| 62 // | |
| 63 // allowed_interfaces | |
| 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 | |
| 66 // manifests. Attempts to bind interfaces not in this whitelist must not be | |
| 67 // fulfilled. | |
| 68 // | |
| 69 // resolved_name | |
| 70 // The resolved name used to complete this connection. | |
| 71 // | |
| 72 AcceptConnection(Identity source, | |
| 73 uint32 source_id, | |
| 74 InterfaceProvider&? local_interfaces, | |
| 75 InterfaceProvider? remote_interfaces, | |
| 76 CapabilityRequest allowed_capabilities, | |
| 77 string resolved_name); | |
| 78 }; | |
| OLD | NEW |