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 3 // found in the LICENSE file. 4 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 7 // shut down the app at anytime. 8 namespace app.runtime { 9 10 [inline_doc] dictionary LaunchItem { 11 // FileEntry for the file. 12 [instanceOf=FileEntry] object entry; 13 14 // The MIME type of the file. 15 DOMString type; 16 }; 17 18 // Optional data for the launch. 19 [inline_doc] dictionary LaunchData { 20 // The id of the file handler that the app is being invoked with. 21 DOMString? id; 22 23 LaunchItem[]? items; 24 }; 25 26 interface Events { 27 // Fired when an app is launched from the launcher. 28 static void onLaunched(optional LaunchData launchData); 29 30 // Fired at Chrome startup to apps that were running when Chrome last shut 31 // down. 32 static void onRestarted(); 33 }; 34 }; 35