Index: services/service_manager/public/interfaces/service.mojom |
diff --git a/services/service_manager/public/interfaces/service.mojom b/services/service_manager/public/interfaces/service.mojom |
index a949332781a9bdb4875f26c734248143992cc059..de5300ebb15f1084f10a986892c6360549d2ab92 100644 |
--- a/services/service_manager/public/interfaces/service.mojom |
+++ b/services/service_manager/public/interfaces/service.mojom |
@@ -8,6 +8,15 @@ import "services/service_manager/public/interfaces/connector.mojom"; |
import "services/service_manager/public/interfaces/interface_provider.mojom"; |
import "services/service_manager/public/interfaces/interface_provider_spec.mojom"; |
+// Metadata describing an instance of a service. |
+struct ServiceInfo { |
+ // The service's identity. |
+ Identity identity; |
+ |
+ // The service's interface provider specs, from its manifest. |
+ map<string, InterfaceProviderSpec> interface_provider_specs; |
+}; |
+ |
// Implemented by any service which is known to the Service Manager, for which |
// instances may be tracked. It allows the implementor to receive lifecycle |
// events and service inbound connection attempts. |
@@ -32,7 +41,7 @@ interface Service { |
// An optional Connector request for the service manager to bind, allowing |
// the initialized client to connect to others. |
// |
- OnStart(Identity identity) => (Connector&? connector_request); |
+ OnStart(ServiceInfo info) => (Connector&? connector_request); |
// Called when another service attempts to open a connection to this |
// service. A service implements this method to complete the exchange |
@@ -43,8 +52,8 @@ interface Service { |
// |
// Parameters: |
// |
- // source |
- // The identity of the instance originating the connection. |
+ // source_info |
+ // Contains the source identity and interface provider specs. |
// |
// interfaces |
// A request for an InterfaceProvider by which the source service may |
@@ -62,7 +71,7 @@ interface Service { |
// is useful mostly if the target wishes to control behavior based on the |
// presence of a value in this set. |
// |
- OnConnect(Identity source, |
+ OnConnect(ServiceInfo source_info, |
InterfaceProvider&? interfaces, |
InterfaceSet required_interfaces, |
CapabilitySet required_capabilities); |