| 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 service_manager.mojom; | 5 module service_manager.mojom; |
| 6 | 6 |
| 7 import "services/service_manager/public/interfaces/connector.mojom"; | 7 import "services/service_manager/public/interfaces/connector.mojom"; |
| 8 import "services/service_manager/public/interfaces/interface_provider.mojom"; | 8 import "services/service_manager/public/interfaces/interface_provider.mojom"; |
| 9 import "services/service_manager/public/interfaces/interface_provider_spec.mojom
"; | 9 import "services/service_manager/public/interfaces/interface_provider_spec.mojom
"; |
| 10 import "services/service_manager/public/interfaces/service_control.mojom"; | 10 import "services/service_manager/public/interfaces/service_control.mojom"; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 // connector_request | 41 // connector_request |
| 42 // An optional Connector request for the service manager to bind, allowing | 42 // An optional Connector request for the service manager to bind, allowing |
| 43 // the initialized client to connect to others. | 43 // the initialized client to connect to others. |
| 44 // | 44 // |
| 45 // control_request | 45 // control_request |
| 46 // An optional associated ServiceControl request. | 46 // An optional associated ServiceControl request. |
| 47 // | 47 // |
| 48 OnStart(ServiceInfo info) => (Connector&? connector_request, | 48 OnStart(ServiceInfo info) => (Connector&? connector_request, |
| 49 associated ServiceControl&? control_request); | 49 associated ServiceControl&? control_request); |
| 50 | 50 |
| 51 // Called when another service attempts to open a connection to this | |
| 52 // service. A service implements this method to complete the exchange | |
| 53 // of interface implementations with the remote service. See also | |
| 54 // documentation in service_manager.mojom for Connect(). The service | |
| 55 // originating the request is referred to as the "source" and the one | |
| 56 // receiving the "target". | |
| 57 // | |
| 58 // The Service must respond to acknowledge receipt of the request. | |
| 59 // | |
| 60 // Parameters: | |
| 61 // | |
| 62 // source_info | |
| 63 // Contains the source identity and interface provider specs. | |
| 64 // | |
| 65 // interfaces | |
| 66 // A request for an InterfaceProvider by which the source service may | |
| 67 // seek to bind interface implementations exported by the target. | |
| 68 // | |
| 69 OnConnect(ServiceInfo source_info, InterfaceProvider&? interfaces) => (); | |
| 70 | |
| 71 // Called when a request to bind an interface is received from another | 51 // Called when a request to bind an interface is received from another |
| 72 // ("source") service. This is the result of that service calling | 52 // ("source") service. This is the result of that service calling |
| 73 // BindInterface() on a Connector. By the time this method is called, the | 53 // BindInterface() on a Connector. By the time this method is called, the |
| 74 // service manager has already completed a policy check to determine that this | 54 // service manager has already completed a policy check to determine that this |
| 75 // interface can be bound. | 55 // interface can be bound. |
| 76 // | 56 // |
| 77 // The Service must respond to acknowledge receipt of the request. | 57 // The Service must respond to acknowledge receipt of the request. |
| 78 // | 58 // |
| 79 // Parameters: | 59 // Parameters: |
| 80 // | 60 // |
| 81 // source_info | 61 // source_info |
| 82 // Contains the source identity and interface provider specs. | 62 // Contains the source identity and interface provider specs. |
| 83 // | 63 // |
| 84 // interface_name | 64 // interface_name |
| 85 // The name of the interface to be bound. | 65 // The name of the interface to be bound. |
| 86 // | 66 // |
| 87 // interface_pipe | 67 // interface_pipe |
| 88 // The message pipe to bind the interface implementation to. | 68 // The message pipe to bind the interface implementation to. |
| 89 // | 69 // |
| 90 // TODO(beng): It occurs to me that |source_info| leaks all metadata about | 70 // TODO(beng): It occurs to me that |source_info| leaks all metadata about |
| 91 // the source's capability requirements to the target. This seems | 71 // the source's capability requirements to the target. This seems |
| 92 // undesirable. The metadata supplied here should be germane to | 72 // undesirable. The metadata supplied here should be germane to |
| 93 // fulfilling this request and no more. | 73 // fulfilling this request and no more. |
| 94 // TODO(beng): This should replace OnConnect(). | |
| 95 OnBindInterface(ServiceInfo source_info, | 74 OnBindInterface(ServiceInfo source_info, |
| 96 string interface_name, | 75 string interface_name, |
| 97 handle<message_pipe> interface_pipe) => (); | 76 handle<message_pipe> interface_pipe) => (); |
| 98 }; | 77 }; |
| OLD | NEW |