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; | 5 module mojo; |
6 | 6 |
7 import "mojo/application/public/interfaces/service_provider.mojom"; | 7 import "mojo/application/public/interfaces/service_provider.mojom"; |
| 8 import "network/public/interfaces/url_loader.mojom"; |
8 | 9 |
9 // An interface through which a Mojo application may communicate with the Mojo | 10 // An interface through which a Mojo application may communicate with the Mojo |
10 // system and request connections to other applications. | 11 // system and request connections to other applications. |
11 interface Shell { | 12 interface Shell { |
12 // Establishes a connection with another application (located at | 13 // Establishes a connection with another application (located at |
13 // |application_url|) through which the calling application and the other | 14 // |request->url|) through which the calling application and the other |
14 // application may request services from one another. | 15 // application may request services from one another. |application_url| is a |
| 16 // URLRequest in case this is called for an HTTP navigation, in which case |
| 17 // HTTP specific information like POST data, referrer header etc... needed. |
15 // | 18 // |
16 // If the calling application would like to request services from the other | 19 // If the calling application would like to request services from the other |
17 // application, it should pass a valid interface request in the |services| | 20 // application, it should pass a valid interface request in the |services| |
18 // parameter (i.e. one containing a valid message pipe endpoint). If the other | 21 // parameter (i.e. one containing a valid message pipe endpoint). If the other |
19 // application does not wish to offer services, it may either not bind an | 22 // application does not wish to offer services, it may either not bind an |
20 // implementation to the interface request, or else bind an implementation | 23 // implementation to the interface request, or else bind an implementation |
21 // that will reject some or all service requests. | 24 // that will reject some or all service requests. |
22 // | 25 // |
23 // If the calling application would like to offer services to the other | 26 // If the calling application would like to offer services to the other |
24 // application, it should pass a bound interface through the | 27 // application, it should pass a bound interface through the |
25 // |exposed_services| parameter. The other application may then request | 28 // |exposed_services| parameter. The other application may then request |
26 // services through that interface. | 29 // services through that interface. |
27 // | 30 // |
28 // At least one of |services| or |exposed_services| should be valid/bound in | 31 // At least one of |services| or |exposed_services| should be valid/bound in |
29 // the call. | 32 // the call. |
30 // | 33 // |
31 // If the |application_url| does not contain a domain, but is of the form | 34 // If the |application_url| does not contain a domain, but is of the form |
32 // "mojo:{service}", it is up to the Mojo shell to select an appropriate | 35 // "mojo:{service}", it is up to the Mojo shell to select an appropriate |
33 // application for the service. Currently, the shell does this based on the | 36 // application for the service. Currently, the shell does this based on the |
34 // value of its --origin flag. | 37 // value of its --origin flag. |
35 ConnectToApplication(string application_url, | 38 ConnectToApplication(URLRequest application_url, |
36 ServiceProvider&? services, | 39 ServiceProvider&? services, |
37 ServiceProvider? exposed_services); | 40 ServiceProvider? exposed_services); |
38 }; | 41 }; |
OLD | NEW |