summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/page_launcher.idl
blob: fceab2b05c9130e7a5922b915f5b56ce27449e35 (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
// Copyright (c) 2013 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.pageLauncher</code> API to provide platform apps with
// an additional way of launching themselves from the browser. To use this api,
// an app needs to specify the page_launcher manifest property, then register to
// listen to pageLauncher.onClicked events.
namespace pageLauncher {
  // Information about the page the user was on when the event was fired.
  dictionary PageData {
    // The url of the page.
    DOMString url;
    // The mimetype of the page.
    DOMString mimetype;
    // The title of the page, if it has one.
    DOMString? title;
    // The text that was selected on the page, if any.
    DOMString? selectionText;
  };

  interface Events {
    // Fired when the user clicks the page launcher entry in the action box.
    // |pageData| : The details of the page the user was on when the button
    // was clicked.
    static void onClicked(PageData pageData);
  };
};