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 { |
(...skipping 17 matching lines...) Expand all Loading... | |
28 system_tray, | 28 system_tray, |
29 about_page, | 29 about_page, |
30 keyboard, | 30 keyboard, |
31 extensions_page, | 31 extensions_page, |
32 management_api, | 32 management_api, |
33 ephemeral_app, | 33 ephemeral_app, |
34 background, | 34 background, |
35 kiosk, | 35 kiosk, |
36 chrome_internal, | 36 chrome_internal, |
37 test, | 37 test, |
38 installed_notification | 38 installed_notification, |
39 action | |
Daniel Erat
2016/08/05 23:36:46
i left a high-level comment on the api proposal ab
jdufault
2016/08/10 22:01:17
I've removed the launch source for the time being,
| |
40 }; | |
41 | |
42 // Enumeration of the different ways notes are launched/created. Possible | |
43 // other names include 'Action' or 'Workflow'. The idea is to encapsulate all | |
Daniel Erat
2016/08/05 23:36:46
i don't understand the "possible other names" sent
jdufault
2016/08/10 22:01:17
Blah, this is an accidental change that shouldn't
| |
44 // launch sources where the user wants to complete some specific action / | |
45 // user-flow. | |
46 enum ActionType { | |
47 new_note | |
48 }; | |
49 | |
50 // Specifies the specific <code>ActionType</code> the app was launched with. | |
Daniel Erat
2016/08/05 23:36:45
nit: delete "specific" since "specifies" is alread
jdufault
2016/08/10 22:01:17
Done.
| |
51 // This also contains any action-type specific data. | |
Daniel Erat
2016/08/05 23:36:46
nit: i'd delete this until such data has actually
jdufault
2016/08/10 22:01:17
Done.
| |
52 dictionary ActionData { | |
53 ActionType action_type; | |
39 }; | 54 }; |
40 | 55 |
41 // Optional data for the launch. Either <code>items</code>, or | 56 // Optional data for the launch. Either <code>items</code>, or |
42 // the pair (<code>url, referrerUrl</code>) can be present for any given | 57 // the pair (<code>url, referrerUrl</code>) can be present for any given |
43 // launch. | 58 // launch. |
44 [inline_doc] dictionary LaunchData { | 59 [inline_doc] dictionary LaunchData { |
45 // The ID of the file or URL handler that the app is being invoked with. | 60 // The ID of the file or URL handler that the app is being invoked with. |
46 // Handler IDs are the top-level keys in the <code>file_handlers</code> | 61 // Handler IDs are the top-level keys in the <code>file_handlers</code> |
47 // and/or <code>url_handlers</code> dictionaries in the manifest. | 62 // and/or <code>url_handlers</code> dictionaries in the manifest. |
48 DOMString? id; | 63 DOMString? id; |
(...skipping 15 matching lines...) Expand all Loading... | |
64 // kiosk session</a>. | 79 // kiosk session</a>. |
65 boolean? isKioskSession; | 80 boolean? isKioskSession; |
66 | 81 |
67 // Whether the app is being launched in a <a | 82 // Whether the app is being launched in a <a |
68 // href="https://support.google.com/chrome/a/answer/3017014">Chrome OS | 83 // href="https://support.google.com/chrome/a/answer/3017014">Chrome OS |
69 // public session</a>. | 84 // public session</a>. |
70 boolean? isPublicSession; | 85 boolean? isPublicSession; |
71 | 86 |
72 // Where the app is launched from. | 87 // Where the app is launched from. |
73 LaunchSource? source; | 88 LaunchSource? source; |
89 | |
90 // Contains data that specifies what type of action this app was launched | |
91 // with. This also contains any action specific data. This is only relevant | |
Daniel Erat
2016/08/05 23:36:45
nit: the second sentence seems extraneous since it
jdufault
2016/08/10 22:01:17
Done.
| |
92 // if the <code>LaunchSource</code> is equal to <code>action</code>. | |
93 ActionData? action_data; | |
74 }; | 94 }; |
75 | 95 |
76 // This object specifies details and operations to perform on the embedding | 96 // This object specifies details and operations to perform on the embedding |
77 // request. The app to be embedded can make a decision on whether or not to | 97 // request. The app to be embedded can make a decision on whether or not to |
78 // allow the embedding and what to embed based on the embedder making the | 98 // allow the embedding and what to embed based on the embedder making the |
79 // request. | 99 // request. |
80 dictionary EmbedRequest { | 100 dictionary EmbedRequest { |
81 DOMString embedderId; | 101 DOMString embedderId; |
82 | 102 |
83 // Optional developer specified data that the app to be embedded can use | 103 // Optional developer specified data that the app to be embedded can use |
(...skipping 19 matching lines...) Expand all Loading... | |
103 | 123 |
104 // Fired at Chrome startup to apps that were running when Chrome last shut | 124 // Fired at Chrome startup to apps that were running when Chrome last shut |
105 // down, or when apps have been requested to restart from their previous | 125 // down, or when apps have been requested to restart from their previous |
106 // state for other reasons (e.g. when the user revokes access to an app's | 126 // state for other reasons (e.g. when the user revokes access to an app's |
107 // retained files the runtime will restart the app). In these situations if | 127 // retained files the runtime will restart the app). In these situations if |
108 // apps do not have an <code>onRestarted</code> handler they will be sent | 128 // apps do not have an <code>onRestarted</code> handler they will be sent |
109 // an <code>onLaunched </code> event instead. | 129 // an <code>onLaunched </code> event instead. |
110 static void onRestarted(); | 130 static void onRestarted(); |
111 }; | 131 }; |
112 }; | 132 }; |
OLD | NEW |