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 mojo.shell.mojom; | 5 module mojo.shell.mojom; |
6 | 6 |
7 import "mojo/shell/public/interfaces/interface_provider.mojom"; | 7 import "mojo/shell/public/interfaces/interface_provider.mojom"; |
8 | 8 |
9 // Specifies a whitelist of applications and services an application can connect | 9 // Specifies a whitelist of applications and services an application can connect |
10 // to. Connections to applications not explicitly specified here as a key are | 10 // to. Connections to applications not explicitly specified here as a key are |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 // connected to. | 74 // connected to. |
75 // | 75 // |
76 Connect(string url, | 76 Connect(string url, |
77 uint32 user_id, | 77 uint32 user_id, |
78 InterfaceProvider&? remote_interfaces, | 78 InterfaceProvider&? remote_interfaces, |
79 InterfaceProvider? local_interfaces) => (uint32 application_id); | 79 InterfaceProvider? local_interfaces) => (uint32 application_id); |
80 | 80 |
81 // Clones this Connector so it can be passed to another thread. | 81 // Clones this Connector so it can be passed to another thread. |
82 Clone(Connector& request); | 82 Clone(Connector& request); |
83 }; | 83 }; |
84 | |
85 // Wraps functionality exposed by the Shell to a Mojo application instance. | |
86 interface Shell { | |
87 // Obtain a Connector that can be used to create connections with other | |
88 // applications. The connector is bound in the shell to the instance that | |
89 // vended this Shell interface, all connectors created and cloned frmo this | |
90 // one are bound to the lifetime of this instance. | |
91 GetConnector(Connector& connector); | |
92 | |
93 // When there are no more instantiated services in an application, it should | |
94 // start its shutdown process by calling this method. Additionally, it should | |
95 // keep track of any new service requests that come in. The shell will then | |
96 // call Application::OnQuitRequested and start queueing new service requests. | |
97 // If the application didn't get any new service requests in the meantime, it | |
98 // should call the callback with a true value. Otherwise it should call it | |
99 // with false. | |
100 QuitApplication(); | |
101 }; | |
OLD | NEW |