summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/app_runtime.idl
blob: da8ddb885a9fdff4924676a59a7743a08a837db5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Use the <code>chrome.app.runtime</code> API to manage the app lifecycle.
// The app runtime manages app installation, controls the event page, and can
// shut down the app at anytime.
namespace app.runtime {

  [inline_doc] dictionary LaunchItem {
    // FileEntry for the file.
    [instanceOf=FileEntry] object entry;

    // The MIME type of the file.
    DOMString type;
  };

  // Optional data for the launch.
  [inline_doc] dictionary LaunchData {
    // The id of the file handler that the app is being invoked with.
    DOMString? id;

    LaunchItem[]? items;
  };

  interface Events {
    // Fired when an app is launched from the launcher.
    static void onLaunched(optional LaunchData launchData);

    // Fired at Chrome startup to apps that were running when Chrome last shut
    // down.
    static void onRestarted();
  };
};