summaryrefslogtreecommitdiffstats
path: root/chrome/common/extensions/api/experimental_app.json
blob: fbcc9ddbaef8b4fbc49fe9daade8a1cc1601f8dc (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// 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.

[
  {
    "namespace":"experimental.app",
    "functions": [
      {
        "name": "notify",
        "type": "function",
        "description": "Creates a notification from this app.",
        "nodoc": true,
        "parameters": [
          {
            "type": "object",
            "name": "details",
            "properties": {
              "extensionId": {
                "type": "string",
                "optional": true,
                "description": "An optional id to do notifications for an app other than the calling app. This is just to allow prototyping with an extension that sends notifications on behalf of apps that don't support notifications yet; this will be removed before the API becomes stable."
              },
              "title": {
                "type": "string",
                "optional": true,
                "description": "The title of the notification."
              },
              "bodyText": {
                "type": "string",
                "optional": true,
                "description": "The text content of the notification."
              },
              "linkUrl": {
                "type": "string",
                "optional": true,
                "description": "The URL for an optional link to show along with the notification. If you specify a linkUrl, you must also specify a value for linkText."
              },
              "linkText": {
                "type": "string",
                "optional": true,
                "description": "If a linkUrl is provided, this is required and will be used as the linkified text. It should be relatively short."
              }
            }
          },
          {
            "type": "function",
            "name": "callback",
            "optional": true,
            "parameters": [],
            "description": "A callback when the function is complete. Any errors will be reported in <a href='extension.html#property-lastError'>chrome.extension.lastError</a>."
          }
        ]
      },
      {
        "name": "clearAllNotifications",
        "type": "function",
        "description": "Clears all previously sent notifications.",
        "nodoc": true,
        "parameters": [
          {
            "type": "object",
            "name": "details",
            "optional": true,
            "properties": {
              "extensionId": {
                "type": "string",
                "optional": true,
                "description": "An optional id to do notifications for an app other than the calling app. This is just to allow prototyping with an extension that sends notifications on behalf of apps that don't support notifications yet; this will be removed before the API becomes stable."
              }
            }
          },
          {
            "type": "function",
            "name": "callback",
            "optional": true,
            "description": "A callback when the function is complete. Any errors will be reported in <a href='extension.html#property-lastError'>chrome.extension.lastError</a>.",
            "parameters": []
          }
        ]
      }
    ]
  }
]