Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1209)

Unified Diff: services/service_manager/public/interfaces/service.mojom

Issue 2425563004: Support reading multiple InterfaceProviderSpecs from manifests (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);

Powered by Google App Engine
This is Rietveld 408576698