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

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

Issue 242150: Implement browserAction.setIcon(ImageData) for extensions. (Closed)
Patch Set: common function Created 11 years, 2 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 1a8035bfebd14b153347f887025c554cab7d8250..016e731406b752e4a276297735cab322eec2ef6f 100755
--- a/chrome/common/extensions/api/extension_api.json
+++ b/chrome/common/extensions/api/extension_api.json
@@ -819,7 +819,21 @@
"type": "function",
"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": "iconId",
+ "description": "An ImageData object from a canvas element, or a zero-based index into the |icons| vector specified in the manifest. This is useful to represent different browser action states. Example: A GMail checker could have a 'new email' icon and a 'no unread email' icon.",
+ "choices": [
+ {"type": "integer", "minimum": 0},
+ {
+ "type": "object",
+ "properties": {
+ "width": {"type": "integer", "description": "The image's width."},
+ "height": {"type": "integer", "description": "The image's height."},
+ "data": {"type": "any", "description": "The pixel data. Must be a CanvasPixelArray, with 32 bits per pixel and size equal to 4*width*height."}
+ }
+ }
+ ]
+ }
]
},
{
« 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