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.shell.mojom; | 5 module mojo.shell.mojom; |
6 | 6 |
7 import "mojo/shell/public/interfaces/service_provider.mojom"; | 7 import "mojo/shell/public/interfaces/service_provider.mojom"; |
8 import "mojo/shell/public/interfaces/shell.mojom"; | 8 import "mojo/shell/public/interfaces/shell.mojom"; |
9 | 9 |
| 10 // TODO(beng): rewrite these comments. |
10 // This is the primary interface implemented by every Mojo application. It | 11 // This is the primary interface implemented by every Mojo application. It |
11 // allows the application to receive its startup arguments from the shell, and | 12 // allows the application to receive its startup arguments from the shell, and |
12 // to be notified of events that occur during its execution. | 13 // to be notified of events that occur during its execution. |
13 // | 14 // |
14 // TODO(aa): It would be good to reorder the parameters once we have interface | 15 // TODO(aa): It would be good to reorder the parameters once we have interface |
15 // versioning. | 16 // versioning. |
16 interface Application { | 17 interface ShellClient { |
17 // Initializes the application with the specified arguments. This method is | 18 // Initializes the application with the specified arguments. This method is |
18 // guaranteed to be called before any other method is called, and will only be | 19 // guaranteed to be called before any other method is called, and will only be |
19 // called once. | 20 // called once. |
20 // | 21 // |
21 // The |url| parameter is the identity of the application as far as the shell | 22 // The |url| parameter is the identity of the application as far as the shell |
22 // is concerned. This will be the URL the application was found at, after all | 23 // is concerned. This will be the URL the application was found at, after all |
23 // mappings, resolution, and redirects. And it will not include the | 24 // mappings, resolution, and redirects. And it will not include the |
24 // querystring, since the querystring is not part of an application's | 25 // querystring, since the querystring is not part of an application's |
25 // identity. | 26 // identity. |
26 // | 27 // |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 mojo.ServiceProvider&? services, | 67 mojo.ServiceProvider&? services, |
67 mojo.ServiceProvider? exposed_services, | 68 mojo.ServiceProvider? exposed_services, |
68 array<string> allowed_interfaces, | 69 array<string> allowed_interfaces, |
69 string resolved_url); | 70 string resolved_url); |
70 | 71 |
71 // Called by the shell in response to calling Shell's QuitApplication. The | 72 // Called by the shell in response to calling Shell's QuitApplication. The |
72 // application should run the callback with true if shutdown can proceed. | 73 // application should run the callback with true if shutdown can proceed. |
73 // See Shell::QuitApplication for details about shutdown workflow. | 74 // See Shell::QuitApplication for details about shutdown workflow. |
74 OnQuitRequested() => (bool can_quit); | 75 OnQuitRequested() => (bool can_quit); |
75 }; | 76 }; |
OLD | NEW |