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