Chromium Code Reviews| Index: chrome/common/extensions/api/extension_api.json |
| diff --git a/chrome/common/extensions/api/extension_api.json b/chrome/common/extensions/api/extension_api.json |
| index 1613b9053703ece72a046054c8a6f05fad42fed3..93b483452ac0cce930908b5a1b813c8be15e3d07 100644 |
| --- a/chrome/common/extensions/api/extension_api.json |
| +++ b/chrome/common/extensions/api/extension_api.json |
| @@ -6172,5 +6172,110 @@ |
| ] |
| } |
| ] |
| + }, |
| + { |
| + "namespace":"experimental.app", |
| + "functions": [ |
| + { |
| + "name": "notify", |
| + "type": "function", |
| + "description": "Creates a notification from this app.", |
| + "parameters": [ |
| + { |
| + "type": "object", |
| + "name": "details", |
| + "properties": { |
| + "passive": { |
| + "type": "boolean", |
| + "optional": "true", |
| + "description": "Whether the notification should be passive (true) or active (false). The default value is true." |
| + }, |
| + "title": { |
| + "type": "string", |
| + "optional": true, |
| + "description": "The title of the notification. The first several characters of this will appear underneath the icon on the new tab page." |
|
Finnur
2011/06/20 12:21:46
nit: Try to phrase it without design details such
asargent_no_longer_on_chrome
2011/06/21 18:10:11
Done.
|
| + }, |
| + "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 at the bottom of the notification. See also linkText." |
|
Finnur
2011/06/20 12:21:46
nit: same here.
asargent_no_longer_on_chrome
2011/06/21 18:10:11
Done.
|
| + }, |
| + "linkText": { |
| + "type": "string", |
| + "optional": true, |
| + "description": "If a linkURL is provided, this will be used as the linkified text. It should be very short, and will be displayed truncated if too long (details TBD)." |
|
Finnur
2011/06/20 12:21:46
"details TBD"? What details?
Finnur
2011/06/20 12:21:46
nit: URL is not uppercase above (linkUrl).
asargent_no_longer_on_chrome
2011/06/21 18:10:11
Done.
asargent_no_longer_on_chrome
2011/06/21 18:10:11
I just removed this for now. Eventually when we se
|
| + }, |
| + "iconData": { |
| + "type": "object", |
| + "isInstanceOf": "ImageData", |
| + "optional": true, |
| + "properties": {}, |
| + "additionalProperties": { "type": "any" }, |
| + "description": "Pixel data for an image to use as the icon for this notification. Must be an ImageData object (for example, from a canvas element)." |
| + } |
| + } |
| + }, |
| + { |
| + "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", |
|
Finnur
2011/06/20 12:21:46
This function got me thinking... We have passive a
asargent_no_longer_on_chrome
2011/06/21 18:10:11
Interesting. Perhaps we'd want to add a "clearOthe
Finnur
2011/06/22 10:40:23
Well, that's kind of the inverse of what I was tal
asargent_no_longer_on_chrome
2011/06/22 17:36:36
Ok, I'll keep thinking about this but not make any
|
| + "type": "function", |
| + "description": "Clears all previously sent notifications.", |
| + "parameters": [ |
| + { |
| + "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>." |
| + } |
| + ] |
| + }, |
| + { |
| + "name": "setLaunchIcon", |
| + "type": "function", |
| + "parameters": [ |
| + { |
| + "type": "object", |
| + "name": "iconData", |
| + "isInstanceOf": "ImageData", |
| + "optional": true, |
| + "properties": {}, |
| + "additionalProperties": { "type": "any" }, |
| + "description": "Pixel data for an image to replace the launch icon on the New Tab Page. Must be an ImageData object (for example, from a canvas element). See http://code.google.com/chrome/webstore/docs/images.html for more details." |
| + }, |
| + { |
| + "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>." |
| + } |
| + ] |
| + }, |
| + { |
| + "name": "resetLaunchIcon", |
| + "type": "function", |
| + "description": "Resets the app's launch icon to its default value as specified in the manifest.json file.", |
| + "parameters": [ |
| + { |
| + "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>." |
| + } |
| + ] |
| + } |
| + ] |
| } |
| ] |