| 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/public/interfaces/application/service_provider.mojom"; | 7 import "mojo/public/interfaces/application/service_provider.mojom"; |
| 8 | 8 |
| 9 // Applications vend Services through the ServiceProvider interface. Services | 9 // Applications vend Services through the ServiceProvider interface. Services |
| 10 // implement Interfaces. | 10 // implement Interfaces. |
| 11 interface Application { | 11 interface Application { |
| 12 // Initialize is guaranteed to be called before any AcceptConnection calls. | 12 // Initialize is guaranteed to be called before any AcceptConnection calls. |
| 13 Initialize(array<string>? args); | 13 Initialize(array<string>? args); |
| 14 | 14 |
| 15 // Called in response to a call to mojo.Shell.ConnectToApplication(). | 15 // Called in response to a call to mojo.Shell.ConnectToApplication(). |
| 16 // The |services| and |exposed_services| parameters are the same as those on | 16 // The |services| and |exposed_services| parameters are the same as those on |
| 17 // mojo.Shell.ConnectToApplication(). | 17 // mojo.Shell.ConnectToApplication(). |
| 18 // |services| will be used to look up services provided by this application. | 18 // |services| will be used to look up services provided by this application. |
| 19 // |exposed_services| can be used to look up services exposed by the | 19 // |exposed_services| can be used to look up services exposed by the |
| 20 // application at |requestor_url|. | 20 // application at |requestor_url|. |
| 21 AcceptConnection(string requestor_url, | 21 AcceptConnection(string requestor_url, |
| 22 ServiceProvider&? services, | 22 ServiceProvider&? services, |
| 23 ServiceProvider? exposed_services); | 23 ServiceProvider? exposed_services); |
| 24 |
| 25 // Called to request the application shut itself down gracefully. |
| 26 RequestQuit(); |
| 24 }; | 27 }; |
| OLD | NEW |