| OLD | NEW |
| (Empty) |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 [DartPackage="mojo"] | |
| 6 module mojo; | |
| 7 | |
| 8 import "mojo/public/interfaces/application/service_provider.mojom"; | |
| 9 import "mojo/public/interfaces/application/shell.mojom"; | |
| 10 | |
| 11 // This is the primary interface implemented by every Mojo application. It | |
| 12 // allows the application to receive its startup arguments from the shell, and | |
| 13 // to be notified of events that occur during its execution. | |
| 14 interface Application { | |
| 15 // Initializes the application with the specified arguments. This method is | |
| 16 // guaranteed to be called before any other method is called, and will only be | |
| 17 // called once. | |
| 18 // | |
| 19 // The |url| parameter is the identity of the application as far as the shell | |
| 20 // is concerned. This will be the URL the application was found at, after all | |
| 21 // mappings, resolution, and redirects. And it will not include the | |
| 22 // querystring, since the querystring is not part of an application's | |
| 23 // identity. | |
| 24 Initialize(Shell shell, array<string>? args, string url); | |
| 25 | |
| 26 // Called when another application (identified by |requestor_url|) attempts to | |
| 27 // open a connection to this application. | |
| 28 // | |
| 29 // resolved_url is the URL that was requested to create this connection, after | |
| 30 // all mappings, resolutions, and redirects. This will include any querystring | |
| 31 // that was part of the request. | |
| 32 AcceptConnection(string requestor_url, | |
| 33 string resolved_url, | |
| 34 ServiceProvider& services); | |
| 35 | |
| 36 // Called to request the application shut itself down gracefully. | |
| 37 RequestQuit(); | |
| 38 }; | |
| OLD | NEW |