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 // Use the <code>chrome.app.runtime</code> API to manage the app lifecycle. | 5 // Use the <code>chrome.app.runtime</code> API to manage the app lifecycle. |
6 // The app runtime manages app installation, controls the event page, and can | 6 // The app runtime manages app installation, controls the event page, and can |
7 // shut down the app at anytime. | 7 // shut down the app at anytime. |
8 namespace app.runtime { | 8 namespace app.runtime { |
9 | 9 |
10 [inline_doc] dictionary LaunchItem { | 10 [inline_doc] dictionary LaunchItem { |
11 // FileEntry for the file. | 11 // FileEntry for the file. |
12 [instanceOf=FileEntry] object entry; | 12 [instanceOf=FileEntry] object entry; |
13 | 13 |
14 // The MIME type of the file. | 14 // The MIME type of the file. |
15 DOMString type; | 15 DOMString type; |
16 }; | 16 }; |
17 | 17 |
18 // Enumeration of app launch sources. | 18 // Enumeration of app launch sources. |
19 enum LaunchSource { | 19 enum LaunchSource { |
20 app_launcher, | 20 app_launcher, |
21 new_tab_page, | 21 new_tab_page, |
22 reload, | 22 reload, |
23 restart, | 23 restart, |
24 load_and_launch, | 24 load_and_launch, |
25 command_line, | 25 command_line, |
26 file_handler, | 26 file_handler, |
27 url_handler, | 27 url_handler, |
28 | |
29 system_tray, | 28 system_tray, |
30 about_page, | 29 about_page, |
31 keyboard | 30 keyboard, |
| 31 extensions_page, |
| 32 management_api, |
| 33 ephemeral_app, |
| 34 background, |
| 35 kiosk, |
| 36 chrome_internal |
32 }; | 37 }; |
33 | 38 |
34 // Optional data for the launch. Either <code>items</code>, or | 39 // Optional data for the launch. Either <code>items</code>, or |
35 // the pair (<code>url, referrerUrl</code>) can be present for any given | 40 // the pair (<code>url, referrerUrl</code>) can be present for any given |
36 // launch. | 41 // launch. |
37 [inline_doc] dictionary LaunchData { | 42 [inline_doc] dictionary LaunchData { |
38 // The ID of the file or URL handler that the app is being invoked with. | 43 // The ID of the file or URL handler that the app is being invoked with. |
39 // Handler IDs are the top-level keys in the <code>file_handlers</code> | 44 // Handler IDs are the top-level keys in the <code>file_handlers</code> |
40 // and/or <code>url_handlers</code> dictionaries in the manifest. | 45 // and/or <code>url_handlers</code> dictionaries in the manifest. |
41 DOMString? id; | 46 DOMString? id; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 96 |
92 // Fired at Chrome startup to apps that were running when Chrome last shut | 97 // Fired at Chrome startup to apps that were running when Chrome last shut |
93 // down, or when apps have been requested to restart from their previous | 98 // down, or when apps have been requested to restart from their previous |
94 // state for other reasons (e.g. when the user revokes access to an app's | 99 // state for other reasons (e.g. when the user revokes access to an app's |
95 // retained files the runtime will restart the app). In these situations if | 100 // retained files the runtime will restart the app). In these situations if |
96 // apps do not have an <code>onRestarted</code> handler they will be sent | 101 // apps do not have an <code>onRestarted</code> handler they will be sent |
97 // an <code>onLaunched </code> event instead. | 102 // an <code>onLaunched </code> event instead. |
98 static void onRestarted(); | 103 static void onRestarted(); |
99 }; | 104 }; |
100 }; | 105 }; |
OLD | NEW |