| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> module to manage the app lifecycle. |
| 6 // The app runtime manages app installation, controls the event page, and can |
| 7 // shut down the app at anytime. |
| 5 namespace app.runtime { | 8 namespace app.runtime { |
| 6 | 9 |
| 7 [inline_doc] dictionary LaunchItem { | 10 [inline_doc] dictionary LaunchItem { |
| 8 // FileEntry for the file. | 11 // FileEntry for the file. |
| 9 [instanceOf=FileEntry] object entry; | 12 [instanceOf=FileEntry] object entry; |
| 10 | 13 |
| 11 // The MIME type of the file. | 14 // The MIME type of the file. |
| 12 DOMString type; | 15 DOMString type; |
| 13 }; | 16 }; |
| 14 | 17 |
| 15 // Optional data for the launch. | 18 // Optional data for the launch. |
| 16 [inline_doc] dictionary LaunchData { | 19 [inline_doc] dictionary LaunchData { |
| 17 // The id of the file handler that the app is being invoked with. | 20 // The id of the file handler that the app is being invoked with. |
| 18 DOMString? id; | 21 DOMString? id; |
| 19 | 22 |
| 20 LaunchItem[]? items; | 23 LaunchItem[]? items; |
| 21 }; | 24 }; |
| 22 | 25 |
| 23 interface Events { | 26 interface Events { |
| 24 // Fired when an app is launched from the launcher. | 27 // Fired when an app is launched from the launcher. |
| 25 static void onLaunched(optional LaunchData launchData); | 28 static void onLaunched(optional LaunchData launchData); |
| 26 | 29 |
| 27 // Fired at Chrome startup to apps that were running when Chrome last shut | 30 // Fired at Chrome startup to apps that were running when Chrome last shut |
| 28 // down. | 31 // down. |
| 29 static void onRestarted(); | 32 static void onRestarted(); |
| 30 }; | 33 }; |
| 31 }; | 34 }; |
| OLD | NEW |