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/interface_provider.mojom"; | 7 import "services/service_manager/public/interfaces/interface_provider.mojom"; |
8 | 8 |
9 const string kRootUserID = "505C0EE9-3013-43C0-82B0-A84F50CF8D84"; | 9 const string kRootUserID = "505C0EE9-3013-43C0-82B0-A84F50CF8D84"; |
10 const string kInheritUserID = "D26290E4-4485-4EAE-81A2-66D1EEB40A9D"; | 10 const string kInheritUserID = "D26290E4-4485-4EAE-81A2-66D1EEB40A9D"; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 // | 81 // |
82 // service | 82 // service |
83 // A pipe to an implementation of Service that the service manager can use | 83 // A pipe to an implementation of Service that the service manager can use |
84 // to communicate with the service. | 84 // to communicate with the service. |
85 // | 85 // |
86 // pid_receiver_request | 86 // pid_receiver_request |
87 // Allows the client process launcher to tell the service manager the PID of | 87 // Allows the client process launcher to tell the service manager the PID of |
88 // the process it created (the pid isn't supplied directly here as the | 88 // the process it created (the pid isn't supplied directly here as the |
89 // process may not have been launched by the time Connect() is called.) | 89 // process may not have been launched by the time Connect() is called.) |
90 // | 90 // |
91 Start(Identity name, | 91 StartService(Identity name, |
92 handle<message_pipe> service, | 92 handle<message_pipe> service, |
93 PIDReceiver& pid_receiver_request); | 93 PIDReceiver& pid_receiver_request); |
94 | 94 |
95 // Requests a connection with another service. The service originating the | 95 // Requests a connection with another service. The service originating the |
96 // request is referred to as the "source" and the one receiving the "target". | 96 // request is referred to as the "source" and the one receiving the "target". |
97 // | 97 // |
98 // The connection is embodied by a pair of message pipes binding the | 98 // The connection is embodied by a pair of message pipes binding the |
99 // InterfaceProvider interface, which allows both the source and target | 99 // InterfaceProvider interface, which allows both the source and target |
100 // services to export interfaces to one another. The interfaces bound via | 100 // services to export interfaces to one another. The interfaces bound via |
101 // these InterfaceProviders are brokered by the service manager according to | 101 // these InterfaceProviders are brokered by the service manager according to |
102 // the security policy defined by each service in its manifest. | 102 // the security policy defined by each service in its manifest. |
103 // | 103 // |
(...skipping 18 matching lines...) Expand all Loading... |
122 // | 122 // |
123 // user_id | 123 // user_id |
124 // The user id the service manager ran the target service as. Typically a | 124 // The user id the service manager ran the target service as. Typically a |
125 // client passes |kInheritUserID| as the user id to Connect(), which is | 125 // client passes |kInheritUserID| as the user id to Connect(), which is |
126 // resolved by the service manager into a valid user id returned through | 126 // resolved by the service manager into a valid user id returned through |
127 // this callback. | 127 // this callback. |
128 // | 128 // |
129 Connect(Identity target, InterfaceProvider&? remote_interfaces) => | 129 Connect(Identity target, InterfaceProvider&? remote_interfaces) => |
130 (ConnectResult result, string user_id); | 130 (ConnectResult result, string user_id); |
131 | 131 |
| 132 // Variant of Connect() above. Will (gradually) replace it. Think of this like |
| 133 // a combination of Connect() and InterfaceProvider::GetInteface() - requests |
| 134 // a connection to a service and binds an interface in one step. |
| 135 // TODO(beng): Update this comment once the implementation is complete. |
| 136 BindInterface(Identity target, |
| 137 string interface_name, |
| 138 handle<message_pipe> interface_pipe) => |
| 139 (ConnectResult result, string user_id); |
| 140 |
132 // Clones this Connector so it can be passed to another thread. | 141 // Clones this Connector so it can be passed to another thread. |
133 Clone(Connector& request); | 142 Clone(Connector& request); |
134 }; | 143 }; |
OLD | NEW |