Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4758)

Unified Diff: chrome/common/extensions/api/extension_api.json

Issue 256032: Add an API to manipulate the browser action badge. (Closed)
Patch Set: meet halfway Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/views/browser_actions_container.cc ('k') | chrome/common/extensions/extension_action.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 357944c1f65154d3f171ee41ea4019810d22c73a..1a8035bfebd14b153347f887025c554cab7d8250 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -809,7 +809,7 @@
{
"name": "setName",
"type": "function",
- "description": "Sets the extension's browser action name.",
+ "description": "Sets the text for the browser action. Shows up in the tooltip if the browser action is visible, and in the menu item.",
"parameters": [
{"type": "string", "name": "name", "description": "The string the browser action should display when moused over.", optional: false}
]
@@ -817,10 +817,37 @@
{
"name": "setIcon",
"type": "function",
- "description": "Sets icon",
+ "description": "Sets the icon for the browser action. Can be up to about 22px square.",
"parameters": [
{"type": "integer", "name": "iconId", "minimum": 0, "optional": true, "description": "A zero-based index into the |icons| vector specified in the manifest. This id is useful to represent different browser action states. Example: A GMail checker could have a 'new email' icon and a 'no unread email' icon."}
]
+ },
+ {
+ "name": "setBadgeText",
+ "type": "function",
+ "description": "Sets the badge text for the browser action. This is printed on top of the icon.",
+ "parameters": [
+ {"type": "string", "name": "text", "description": "Any number of characters can be passed, but only about four can fit in the space."}
+ ]
+ },
+ {
+ "name": "setBadgeBackgroundColor",
+ "type": "function",
+ "description": "Sets the background color for the badge.",
+ "parameters": [
+ {
+ "type": "array",
+ "name": "color",
+ "description": "An array of four integers in the range [0,255] that make up the ARGB color for the bakground of the badge.",
+ "items": {
+ "type": "integer",
+ "minimum": 0,
+ "maximum": 255
+ },
+ "minItems": 4,
+ "maxItems": 4
+ }
+ ]
}
],
"events": [
« no previous file with comments | « chrome/browser/views/browser_actions_container.cc ('k') | chrome/common/extensions/extension_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698