| 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 import "network/public/interfaces/url_loader.mojom"; |
| 9 | 9 |
| 10 // Specifies a whitelist of applications and services an application can connect | 10 // Specifies a whitelist of applications and services an application can connect |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 // At least one of |services| or |exposed_services| should be valid/bound in | 49 // At least one of |services| or |exposed_services| should be valid/bound in |
| 50 // the call. | 50 // the call. |
| 51 // | 51 // |
| 52 // If the |application_url| does not contain a domain, but is of the form | 52 // If the |application_url| does not contain a domain, but is of the form |
| 53 // "mojo:{service}", it is up to the Mojo shell to select an appropriate | 53 // "mojo:{service}", it is up to the Mojo shell to select an appropriate |
| 54 // application for the service. Currently, the shell does this based on the | 54 // application for the service. Currently, the shell does this based on the |
| 55 // value of its --origin flag. | 55 // value of its --origin flag. |
| 56 // | 56 // |
| 57 // |filter| is a whitelist of application URLs and services that the target | 57 // |filter| is a whitelist of application URLs and services that the target |
| 58 // application is permitted to connect to. See documentation for | 58 // application is permitted to connect to. See documentation for |
| 59 // CapabilityFilter above. Note also that this parameter may be NULL, which | 59 // CapabilityFilter above. |
| 60 // has the same meaning as allowing the target application to connect to | |
| 61 // any application and service. | |
| 62 // | 60 // |
| 63 // If the connection to |application_url| involves a content handler, then | 61 // If the connection to |application_url| involves a content handler, then |
| 64 // |content_handler_id| is the id of the deepest content handler used to | 62 // |content_handler_id| is the id of the deepest content handler used to |
| 65 // establish the connection to |application_url|. If no content handler is | 63 // establish the connection to |application_url|. If no content handler is |
| 66 // used |content_handler_id| is kInvalidContentHandlerID. | 64 // used |content_handler_id| is kInvalidContentHandlerID. |
| 67 // TODO(beng): determine if we need to expose the target application id also. | 65 // TODO(beng): determine if we need to expose the target application id also. |
| 68 ConnectToApplication(URLRequest application_url, | 66 ConnectToApplication(URLRequest application_url, |
| 69 ServiceProvider&? services, | 67 ServiceProvider&? services, |
| 70 ServiceProvider? exposed_services, | 68 ServiceProvider? exposed_services, |
| 71 CapabilityFilter? filter) => (uint32 content_handler_id); | 69 CapabilityFilter filter) => (uint32 content_handler_id); |
| 72 | 70 |
| 73 // When there are no more instantiated services in an application, it should | 71 // When there are no more instantiated services in an application, it should |
| 74 // start its shutdown process by calling this method. Additionally, it should | 72 // start its shutdown process by calling this method. Additionally, it should |
| 75 // keep track of any new service requests that come in. The shell will then | 73 // keep track of any new service requests that come in. The shell will then |
| 76 // call Application::OnQuitRequested and start queueing new service requests. | 74 // call Application::OnQuitRequested and start queueing new service requests. |
| 77 // If the application didn't get any new service requests in the meantime, it | 75 // If the application didn't get any new service requests in the meantime, it |
| 78 // should call the callback with a true value. Otherwise it should call it | 76 // should call the callback with a true value. Otherwise it should call it |
| 79 // with false. | 77 // with false. |
| 80 QuitApplication(); | 78 QuitApplication(); |
| 81 }; | 79 }; |
| OLD | NEW |