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

Side by Side 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, 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 unified diff | Download patch
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "types": [ 4 "types": [
5 { 5 {
6 "id": "Port", 6 "id": "Port",
7 "type": "object", 7 "type": "object",
8 "description": "An object which allows two way communication with other pages.", 8 "description": "An object which allows two way communication with other pages.",
9 "properties": { 9 "properties": {
10 "name": {"type": "string"}, 10 "name": {"type": "string"},
(...skipping 791 matching lines...) Expand 10 before | Expand all | Expand 10 after
802 "events": [ 802 "events": [
803 ] 803 ]
804 }, 804 },
805 { 805 {
806 "namespace": "browserAction", 806 "namespace": "browserAction",
807 "types": [], 807 "types": [],
808 "functions": [ 808 "functions": [
809 { 809 {
810 "name": "setName", 810 "name": "setName",
811 "type": "function", 811 "type": "function",
812 "description": "Sets the extension's browser action name.", 812 "description": "Sets the text for the browser action. Shows up in the to oltip if the browser action is visible, and in the menu item.",
813 "parameters": [ 813 "parameters": [
814 {"type": "string", "name": "name", "description": "The string the brow ser action should display when moused over.", optional: false} 814 {"type": "string", "name": "name", "description": "The string the brow ser action should display when moused over.", optional: false}
815 ] 815 ]
816 }, 816 },
817 { 817 {
818 "name": "setIcon", 818 "name": "setIcon",
819 "type": "function", 819 "type": "function",
820 "description": "Sets icon", 820 "description": "Sets the icon for the browser action. Can be up to about 22px square.",
821 "parameters": [ 821 "parameters": [
822 {"type": "integer", "name": "iconId", "minimum": 0, "optional": true, "description": "A zero-based index into the |icons| vector specified in the mani fest. 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."} 822 {"type": "integer", "name": "iconId", "minimum": 0, "optional": true, "description": "A zero-based index into the |icons| vector specified in the mani fest. 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."}
823 ] 823 ]
824 },
825 {
826 "name": "setBadgeText",
827 "type": "function",
828 "description": "Sets the badge text for the browser action. This is prin ted on top of the icon.",
829 "parameters": [
830 {"type": "string", "name": "text", "description": "Any number of chara cters can be passed, but only about four can fit in the space."}
831 ]
832 },
833 {
834 "name": "setBadgeBackgroundColor",
835 "type": "function",
836 "description": "Sets the background color for the badge.",
837 "parameters": [
838 {
839 "type": "array",
840 "name": "color",
841 "description": "An array of four integers in the range [0,255] that make up the ARGB color for the bakground of the badge.",
842 "items": {
843 "type": "integer",
844 "minimum": 0,
845 "maximum": 255
846 },
847 "minItems": 4,
848 "maxItems": 4
849 }
850 ]
824 } 851 }
825 ], 852 ],
826 "events": [ 853 "events": [
827 ] 854 ]
828 }, 855 },
829 { 856 {
830 "namespace": "bookmarks", 857 "namespace": "bookmarks",
831 "types": [ 858 "types": [
832 { 859 {
833 "id": "BookmarkTreeNode", 860 "id": "BookmarkTreeNode",
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1218 "type": "function", 1245 "type": "function",
1219 "description": "Logs a message during internal unit testing.", 1246 "description": "Logs a message during internal unit testing.",
1220 "parameters": [ 1247 "parameters": [
1221 {"type": "string", "name": "message"} 1248 {"type": "string", "name": "message"}
1222 ] 1249 ]
1223 } 1250 }
1224 ], 1251 ],
1225 "events": [] 1252 "events": []
1226 } 1253 }
1227 ] 1254 ]
OLDNEW
« 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