OLD | NEW |
| (Empty) |
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 [ | |
6 { | |
7 "namespace":"experimental.app", | |
8 "functions": [ | |
9 { | |
10 "name": "notify", | |
11 "type": "function", | |
12 "description": "Creates a notification from this app.", | |
13 "parameters": [ | |
14 { | |
15 "type": "object", | |
16 "name": "details", | |
17 "properties": { | |
18 "extensionId": { | |
19 "type": "string", | |
20 "optional": true, | |
21 "description": "An optional id to do notifications for an app ot
her than the calling app. This is just to allow prototyping with an extension th
at sends notifications on behalf of apps that don't support notifications yet; t
his will be removed before the API becomes stable." | |
22 }, | |
23 "title": { | |
24 "type": "string", | |
25 "optional": true, | |
26 "description": "The title of the notification." | |
27 }, | |
28 "bodyText": { | |
29 "type": "string", | |
30 "optional": true, | |
31 "description": "The text content of the notification." | |
32 }, | |
33 "linkUrl": { | |
34 "type": "string", | |
35 "optional": true, | |
36 "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 li
nkText." | |
37 }, | |
38 "linkText": { | |
39 "type": "string", | |
40 "optional": true, | |
41 "description": "If a linkUrl is provided, this is required and w
ill be used as the linkified text. It should be relatively short." | |
42 } | |
43 } | |
44 }, | |
45 { | |
46 "type": "function", | |
47 "name": "callback", | |
48 "optional": true, | |
49 "parameters": [], | |
50 "description": "A callback when the function is complete. Any errors
will be reported in <a href='extension.html#property-lastError'>chrome.extensio
n.lastError</a>." | |
51 } | |
52 ] | |
53 }, | |
54 { | |
55 "name": "clearAllNotifications", | |
56 "type": "function", | |
57 "description": "Clears all previously sent notifications.", | |
58 "parameters": [ | |
59 { | |
60 "type": "object", | |
61 "name": "details", | |
62 "optional": true, | |
63 "properties": { | |
64 "extensionId": { | |
65 "type": "string", | |
66 "optional": true, | |
67 "description": "An optional id to do notifications for an app ot
her than the calling app. This is just to allow prototyping with an extension th
at sends notifications on behalf of apps that don't support notifications yet; t
his will be removed before the API becomes stable." | |
68 } | |
69 } | |
70 }, | |
71 { | |
72 "type": "function", | |
73 "name": "callback", | |
74 "optional": true, | |
75 "description": "A callback when the function is complete. Any errors
will be reported in <a href='extension.html#property-lastError'>chrome.extensio
n.lastError</a>.", | |
76 "parameters": [] | |
77 } | |
78 ] | |
79 } | |
80 ], | |
81 "events": [ | |
82 { | |
83 "nodoc": true, | |
84 "name": "onLaunched", | |
85 "type": "function", | |
86 "description": "Fired when the app is launched." | |
87 } | |
88 ] | |
89 } | |
90 ] | |
OLD | NEW |