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

Side by Side Diff: chrome/common/extensions/api/extension_api.json

Issue 269079: Implement new page action API. (Closed)
Patch Set: compile fixes 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
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/extensions/docs/pageAction.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 }, 813 },
814 "optional": false 814 "optional": false
815 } 815 }
816 ] 816 ]
817 } 817 }
818 ], 818 ],
819 "events": [ 819 "events": [
820 ] 820 ]
821 }, 821 },
822 { 822 {
823 "namespace": "pageAction",
824 "types": [],
825 "functions": [
826 {
827 "name": "show",
828 "type": "function",
829 "description": "Show the page action. The page action is shown whenever the tab is selected.",
830 "parameters": [
831 {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}
832 ]
833 },
834 {
835 "name": "hide",
836 "type": "function",
837 "description": "Hide the page action.",
838 "parameters": [
839 {"type": "integer", "name": "tabId", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."}
840 ]
841 },
842 {
843 "name": "setTitle",
844 "type": "function",
845 "description": "Set the title of the page action. This is displayed in a tooltip over the page action.",
846 "parameters": [
847 {
848 "name": "details",
849 "type": "object",
850 "properties": {
851 "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
852 "title": {"type": "string", "description": "The tooltip string."}
853 }
854 }
855 ]
856 },
857 {
858 "name": "setIcon",
859 "type": "function",
860 "description": "Sets the icon for the page action. The icon can be speci fied either as the index of one of the icons that was pre-specified in the manif est, or as the pixel data from a Canvas element. Either the iconIndex or the ima geData property must be specified.",
861 "parameters": [
862 {
863 "name": "details",
864 "type": "object",
865 "properties": {
866 "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
867 "imageData": {
868 "type": "any",
869 "description": "Pixel data for an image. Must be an ImageData ob ject (eg from a <code>canvas</code> element).",
870 "optional": true
871 },
872 "iconIndex": {
873 "type": "integer",
874 "minimum": 0,
875 "description": "The zero-based index into the |icons| vector spe cified in the manifest.",
876 "optional": true
877 }
878 }
879 }
880 ]
881 },
882 {
883 "name": "setBadgeText",
884 "type": "function",
885 "description": "Sets the badge text for the page action. This is printed on top of the icon.",
886 "parameters": [
887 {
888 "name": "details",
889 "type": "object",
890 "properties": {
891 "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
892 "text": {"type": "string", "description": "Any number of character s can be passed, but only about four can fit in the space."}
893 }
894 }
895 ]
896 },
897 {
898 "name": "setBadgeTextColor",
899 "type": "function",
900 "description": "Sets the text color for the badge.",
901 "parameters": [
902 {
903 "name": "details",
904 "type": "object",
905 "properties": {
906 "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
907 "color": {
908 "type": "array",
909 "description": "An array of four integers in the range [0,255] t hat make up the ARGB color for the text of the badge.",
910 "items": {
911 "type": "integer",
912 "minimum": 0,
913 "maximum": 255
914 },
915 "minItems": 4,
916 "maxItems": 4
917 }
918 }
919 }
920 ]
921 },
922 {
923 "name": "setBadgeBackgroundColor",
924 "type": "function",
925 "description": "Sets the background color for the badge.",
926 "parameters": [
927 {
928 "name": "details",
929 "type": "object",
930 "properties": {
931 "tabId": {"type": "integer", "minimum": 0, "description": "The id of the tab for which you want to modify the page action."},
932 "color": {
933 "type": "array",
934 "description": "An array of four integers in the range [0,255] t hat make up the ARGB color for the text of the badge.",
935 "items": {
936 "type": "integer",
937 "minimum": 0,
938 "maximum": 255
939 },
940 "minItems": 4,
941 "maxItems": 4
942 }
943 }
944 }
945 ]
946 }
947 ],
948 "events": [
949 {
950 "name": "onClicked",
951 "type": "function",
952 "description": "Fired when a page action button is clicked.",
953 "parameters": [
954 {
955 "name": "tab",
956 "$ref": "Tab"
957 }
958 ]
959 }
960 ]
961 },
962 {
823 "namespace": "browserAction", 963 "namespace": "browserAction",
824 "types": [], 964 "types": [],
825 "functions": [ 965 "functions": [
826 { 966 {
827 "name": "setTitle", 967 "name": "setTitle",
828 "type": "function", 968 "type": "function",
829 "description": "Sets the title of the browser action. Shows up in the to oltip if the browser action is visible, and in the menu item.", 969 "description": "Sets the title of the browser action. Shows up in the to oltip if the browser action is visible, and in the menu item.",
830 "parameters": [ 970 "parameters": [
831 { 971 {
832 "name": "details", 972 "name": "details",
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
1312 "type": "function", 1452 "type": "function",
1313 "description": "Logs a message during internal unit testing.", 1453 "description": "Logs a message during internal unit testing.",
1314 "parameters": [ 1454 "parameters": [
1315 {"type": "string", "name": "message"} 1455 {"type": "string", "name": "message"}
1316 ] 1456 ]
1317 } 1457 }
1318 ], 1458 ],
1319 "events": [] 1459 "events": []
1320 } 1460 }
1321 ] 1461 ]
OLDNEW
« no previous file with comments | « chrome/chrome.gyp ('k') | chrome/common/extensions/docs/pageAction.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698