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

Side by Side Diff: services/service_manager/public/interfaces/connector.mojom

Issue 2610173003: Add RegisterService, split out of Connect(). (Closed)
Patch Set: . Created 3 years, 11 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 unified diff | Download patch
OLDNEW
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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 handle<message_pipe> service; 80 handle<message_pipe> service;
81 81
82 // Allows the client process launcher to tell the service manager the PID of 82 // Allows the client process launcher to tell the service manager the PID of
83 // the process it created (the pid isn't supplied directly here as the process 83 // the process it created (the pid isn't supplied directly here as the process
84 // may not have been launched by the time Connect() is called.) 84 // may not have been launched by the time Connect() is called.)
85 handle<message_pipe> pid_receiver_request; 85 handle<message_pipe> pid_receiver_request;
86 }; 86 };
87 87
88 // Encapsulates establishing connections with other Services. 88 // Encapsulates establishing connections with other Services.
89 interface Connector { 89 interface Connector {
90 // Registers a Service in a process started by someone other than the Service
91 // Manager.
92 RegisterService(Identity name,
Ken Rockot(use gerrit already) 2017/01/05 20:31:48 nit: I think RegisterInstance might be a more accu
93 ClientProcessConnection client_process_connection);
Ken Rockot(use gerrit already) 2017/01/05 20:31:48 nit: Maybe just flatten service and pid_receiver_r
94
90 // Requests a connection with another service. The service originating the 95 // Requests a connection with another service. The service originating the
91 // 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".
92 // 97 //
93 // 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
94 // InterfaceProvider interface, which allows both the source and target 99 // InterfaceProvider interface, which allows both the source and target
95 // services to export interfaces to one another. The interfaces bound via 100 // services to export interfaces to one another. The interfaces bound via
96 // these InterfaceProviders are brokered by the service manager according to 101 // these InterfaceProviders are brokered by the service manager according to
97 // the security policy defined by each service in its manifest. 102 // the security policy defined by each service in its manifest.
98 // 103 //
99 // If the target service is not running, the service manager will run it, 104 // If the target service is not running, the service manager will run it,
(...skipping 26 matching lines...) Expand all
126 // this callback. 131 // this callback.
127 // 132 //
128 Connect(Identity target, 133 Connect(Identity target,
129 InterfaceProvider&? remote_interfaces, 134 InterfaceProvider&? remote_interfaces,
130 ClientProcessConnection? client_process_connection) => 135 ClientProcessConnection? client_process_connection) =>
131 (ConnectResult result, string user_id); 136 (ConnectResult result, string user_id);
132 137
133 // Clones this Connector so it can be passed to another thread. 138 // Clones this Connector so it can be passed to another thread.
134 Clone(Connector& request); 139 Clone(Connector& request);
135 }; 140 };
OLDNEW
« no previous file with comments | « services/service_manager/public/cpp/lib/connector_impl.cc ('k') | services/service_manager/service_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698