OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Quick definitions: | 5 // Quick definitions: |
6 // The Shell is the finder and launcher of Applications. | 6 // The Shell is the finder and launcher of Applications. |
7 // Applications vend Services through the ServiceProvider interface. | 7 // Applications vend Services through the ServiceProvider interface. |
8 // Services implement Interfaces. | 8 // Services implement Interfaces. |
9 // An Application uses it's Shell interface to connect to other Applications. | 9 // An Application uses it's Shell interface to connect to other Applications. |
10 module mojo { | 10 module mojo { |
11 | 11 |
12 [Client=ServiceProvider] | 12 [Client=ServiceProvider] |
13 interface ServiceProvider { | 13 interface ServiceProvider { |
14 // Loads url. mojo:{service} will result in the the value of the | 14 // Loads url. mojo:{service} will result in the the value of the |
15 // --origin flag to the shell being used. | 15 // --origin flag to the shell being used. |
16 ConnectToService(string interface_name, handle<message_pipe> client_handle); | 16 ConnectToService(string interface_name, handle<message_pipe> client_handle); |
17 }; | 17 }; |
18 | 18 |
19 // TODO(davemore): Break Application & Shell into their own files. | 19 // TODO(davemore): Break Application & Shell into their own files. |
20 [Client=Application] | 20 [Client=Application] |
21 interface Shell { | 21 interface Shell { |
22 // Loads url. mojo:{service} will result in the user of the value of the | 22 // Loads url. mojo:{service} will result in the user of the value of the |
23 // --origin flag to the shell being used. | 23 // --origin flag to the shell being used. |
24 ConnectToApplication(string application_url, ServiceProvider& provider); | 24 ConnectToApplication(string application_url, ServiceProvider& provider); |
25 }; | 25 }; |
26 | 26 |
27 [Client=Shell] | 27 [Client=Shell] |
28 interface Application { | 28 interface Application { |
29 AcceptConnection(string requestor_url, ServiceProvider provider); | 29 AcceptConnection(string requestor_url, ServiceProvider provider); |
30 Terminate(); | |
darin (slow to review)
2014/07/28 16:49:58
I'm not sure this is the API we want for applicati
tim (not reviewing)
2014/07/28 16:55:17
If the primordial app exits and we want to quit th
| |
30 }; | 31 }; |
31 | 32 |
32 } | 33 } |
OLD | NEW |