Chromium Code Reviews| 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 "mojo/application/public/interfaces/shell.mojom"; | 8 import "mojo/application/public/interfaces/shell.mojom"; |
| 9 | 9 |
| 10 // This is the primary interface implemented by every Mojo application. It | 10 // This is the primary interface implemented by every Mojo application. It |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 39 // parameter. This application may then request services through that | 39 // parameter. This application may then request services through that |
| 40 // interface. | 40 // interface. |
| 41 // | 41 // |
| 42 // It is possible that both parameters will be valid/bound if the other | 42 // It is possible that both parameters will be valid/bound if the other |
| 43 // application wants to both request services from and offer services to this | 43 // application wants to both request services from and offer services to this |
| 44 // application. | 44 // application. |
| 45 // | 45 // |
| 46 // This application is free to ignore the |services| or |exposed_services| | 46 // This application is free to ignore the |services| or |exposed_services| |
| 47 // parameters if it does not wish to offer or request services. | 47 // parameters if it does not wish to offer or request services. |
| 48 // | 48 // |
| 49 // resolved_url is the URL that was requested to create this connection, after | 49 // |allowed_interfaces| is a set of interface names that the shell has |
| 50 // all mappings, resolutions, and redirects. This will include any querystring | 50 // determined can be exposed by this application to the connecting |
| 51 // that was part of the request. | 51 // application. When this parameter is empty, this application is free to |
|
sky
2015/07/24 15:36:55
Update comment about empty.
| |
| 52 // offer all of its services to the connecting application. When it is | |
| 53 // non-empty, this application should expose only those interfaces as the | |
| 54 // connecting application may not be trusted to access others. | |
| 55 // | |
| 56 // |resolved_url| is the URL that was requested to create this connection, | |
| 57 // after all mappings, resolutions, and redirects. This will include any | |
| 58 // querystring that was part of the request. | |
| 59 // | |
| 52 AcceptConnection(string requestor_url, | 60 AcceptConnection(string requestor_url, |
| 53 ServiceProvider&? services, | 61 ServiceProvider&? services, |
| 54 ServiceProvider? exposed_services, | 62 ServiceProvider? exposed_services, |
| 63 array<string> allowed_interfaces, | |
| 55 string resolved_url); | 64 string resolved_url); |
| 56 | 65 |
| 57 // Called by the shell in response to calling Shell's QuitApplication. The | 66 // Called by the shell in response to calling Shell's QuitApplication. The |
| 58 // application should run the callback with true if shutdown can proceed. | 67 // application should run the callback with true if shutdown can proceed. |
| 59 // See Shell::QuitApplication for details about shutdown workflow. | 68 // See Shell::QuitApplication for details about shutdown workflow. |
| 60 OnQuitRequested() => (bool can_quit); | 69 OnQuitRequested() => (bool can_quit); |
| 61 }; | 70 }; |
| OLD | NEW |