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 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // An app can be launched with a specific action in mind, for example, to | 41 // An app can be launched with a specific action in mind, for example, to |
42 // create a new note. The type of action the app was launched | 42 // create a new note. The type of action the app was launched |
43 // with is available inside of the |actionData| field from the LaunchData | 43 // with is available inside of the |actionData| field from the LaunchData |
44 // instance. | 44 // instance. |
45 enum ActionType { | 45 enum ActionType { |
46 // The user wants to quickly take a new note. | 46 // The user wants to quickly take a new note. |
47 new_note | 47 new_note |
48 }; | 48 }; |
49 | 49 |
50 // Status of the play store. | |
51 [nodoc] enum PlayStoreStatus { | |
52 // Indicates that the play store is enabled. It also implies available. | |
53 enabled, | |
54 // Indicates that the play store is available but not enabled. | |
55 available, | |
56 // Indicates that the play store status is unknown. | |
57 unknown | |
58 }; | |
59 | |
60 // Optional data that includes action-specific launch information. | 50 // Optional data that includes action-specific launch information. |
61 dictionary ActionData { | 51 dictionary ActionData { |
62 ActionType actionType; | 52 ActionType actionType; |
63 }; | 53 }; |
64 | 54 |
65 // Optional data for the launch. Either <code>items</code>, or | 55 // Optional data for the launch. Either <code>items</code>, or |
66 // the pair (<code>url, referrerUrl</code>) can be present for any given | 56 // the pair (<code>url, referrerUrl</code>) can be present for any given |
67 // launch. | 57 // launch. |
68 [inline_doc] dictionary LaunchData { | 58 [inline_doc] dictionary LaunchData { |
69 // The ID of the file or URL handler that the app is being invoked with. | 59 // The ID of the file or URL handler that the app is being invoked with. |
(...skipping 23 matching lines...) Expand all Loading... |
93 // public session</a>. | 83 // public session</a>. |
94 boolean? isPublicSession; | 84 boolean? isPublicSession; |
95 | 85 |
96 // Where the app is launched from. | 86 // Where the app is launched from. |
97 LaunchSource? source; | 87 LaunchSource? source; |
98 | 88 |
99 // Contains data that specifies the <code>ActionType</code> this app was | 89 // Contains data that specifies the <code>ActionType</code> this app was |
100 // launched with. This is null if the app was not launched with a specific | 90 // launched with. This is null if the app was not launched with a specific |
101 // action intent. | 91 // action intent. |
102 ActionData? actionData; | 92 ActionData? actionData; |
103 | |
104 // Internal fields used to indicate ARC++ status on the device. | |
105 [nodoc] PlayStoreStatus? playStoreStatus; | |
106 }; | 93 }; |
107 | 94 |
108 // This object specifies details and operations to perform on the embedding | 95 // This object specifies details and operations to perform on the embedding |
109 // request. The app to be embedded can make a decision on whether or not to | 96 // request. The app to be embedded can make a decision on whether or not to |
110 // allow the embedding and what to embed based on the embedder making the | 97 // allow the embedding and what to embed based on the embedder making the |
111 // request. | 98 // request. |
112 dictionary EmbedRequest { | 99 dictionary EmbedRequest { |
113 DOMString embedderId; | 100 DOMString embedderId; |
114 | 101 |
115 // Optional developer specified data that the app to be embedded can use | 102 // Optional developer specified data that the app to be embedded can use |
(...skipping 19 matching lines...) Expand all Loading... |
135 | 122 |
136 // Fired at Chrome startup to apps that were running when Chrome last shut | 123 // Fired at Chrome startup to apps that were running when Chrome last shut |
137 // down, or when apps have been requested to restart from their previous | 124 // down, or when apps have been requested to restart from their previous |
138 // state for other reasons (e.g. when the user revokes access to an app's | 125 // state for other reasons (e.g. when the user revokes access to an app's |
139 // retained files the runtime will restart the app). In these situations if | 126 // retained files the runtime will restart the app). In these situations if |
140 // apps do not have an <code>onRestarted</code> handler they will be sent | 127 // apps do not have an <code>onRestarted</code> handler they will be sent |
141 // an <code>onLaunched </code> event instead. | 128 // an <code>onLaunched </code> event instead. |
142 static void onRestarted(); | 129 static void onRestarted(); |
143 }; | 130 }; |
144 }; | 131 }; |
OLD | NEW |