| 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 // Entry for the item. | 11 // Entry for the item. |
| 12 [instanceOf=Entry] object entry; | 12 [instanceOf=FileSystemEntry] 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 // This should be kept in sync with AppLaunchSource in | 19 // This should be kept in sync with AppLaunchSource in |
| 20 // extensions/common/constants.h, and GetLaunchSourceEnum() in | 20 // extensions/common/constants.h, and GetLaunchSourceEnum() in |
| 21 // extensions/browser/api/app_runtime/app_runtime_api.cc. | 21 // extensions/browser/api/app_runtime/app_runtime_api.cc. |
| 22 // Note the enumeration is used in UMA histogram so entries | 22 // Note the enumeration is used in UMA histogram so entries |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 141 |
| 142 // Fired at Chrome startup to apps that were running when Chrome last shut | 142 // Fired at Chrome startup to apps that were running when Chrome last shut |
| 143 // down, or when apps have been requested to restart from their previous | 143 // down, or when apps have been requested to restart from their previous |
| 144 // state for other reasons (e.g. when the user revokes access to an app's | 144 // state for other reasons (e.g. when the user revokes access to an app's |
| 145 // retained files the runtime will restart the app). In these situations if | 145 // retained files the runtime will restart the app). In these situations if |
| 146 // apps do not have an <code>onRestarted</code> handler they will be sent | 146 // apps do not have an <code>onRestarted</code> handler they will be sent |
| 147 // an <code>onLaunched </code> event instead. | 147 // an <code>onLaunched </code> event instead. |
| 148 static void onRestarted(); | 148 static void onRestarted(); |
| 149 }; | 149 }; |
| 150 }; | 150 }; |
| OLD | NEW |