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

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

Issue 5271009: Replace 'descriptionStyles' in omnibox API with a simple xml (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | Annotate | Revision Log
OLDNEW
1 [ 1 [
2 { 2 {
3 "namespace": "extension", 3 "namespace": "extension",
4 "unprivileged": true, 4 "unprivileged": true,
5 "types": [ 5 "types": [
6 { 6 {
7 "id": "MessageSender", 7 "id": "MessageSender",
8 "type": "object", 8 "type": "object",
9 "description": "An object containing information about the script contex t that sent a message or request.", 9 "description": "An object containing information about the script contex t that sent a message or request.",
10 "properties": { 10 "properties": {
(...skipping 3923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3934 "description": "A suggest result.", 3934 "description": "A suggest result.",
3935 "properties": { 3935 "properties": {
3936 "content": { 3936 "content": {
3937 "type": "string", 3937 "type": "string",
3938 "minLength": 1, 3938 "minLength": 1,
3939 "description": "The text that is put into the URL bar, and that is s ent to the extension when the user chooses this entry." 3939 "description": "The text that is put into the URL bar, and that is s ent to the extension when the user chooses this entry."
3940 }, 3940 },
3941 "description": { 3941 "description": {
3942 "type": "string", 3942 "type": "string",
3943 "minLength": 1, 3943 "minLength": 1,
3944 "description": "The text that is displayed in the URL dropdown. Can optionally be stylized by the descriptionStyles parameter." 3944 "description": "The text that is displayed in the URL dropdown. Can contain XML-style markup for styling. The supported tags are 'url' (for a litera l URL), 'match' (for highlighting text that matched what the user's query), and 'dim' (for dim helper text). The styles can be nested, eg. <dim><match>dimmed ma tch</match></dim>."
3945 },
3946 "descriptionStyles": {
3947 "type": "array",
3948 "optional": true,
3949 "description": "An array of style objects, created using styleUrl, s tyleMatch, or styleDim. A style applies to the region of text specified by the s tyle's starting offset and length. If there are any overlapping regions of text covered by multiple styles, they will be added together (e.g. 'match' + 'dim' wi ll display a dimmed match). Not all style combinations will be visually distinct (e.g. 'url' + 'dim' may look identical to 'url').",
3950 "items": {
3951 "type": "object",
3952 "properties": {
3953 "type": {"type": "string", "enum": ["url", "match", "dim"]},
3954 "offset": {"type": "integer"},
3955 "length": {"type": "integer", "optional": true}
3956 }
3957 }
3958 } 3945 }
3959 } 3946 }
3960 } 3947 }
3961 ], 3948 ],
3962 "functions": [ 3949 "functions": [
3963 { 3950 {
3964 "name": "sendSuggestions", 3951 "name": "sendSuggestions",
3965 "nodoc": true, 3952 "nodoc": true,
3966 "type": "function", 3953 "type": "function",
3967 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.", 3954 "description": "A callback passed to the onInputChanged event used for s ending suggestions back to the browser.",
3968 "parameters": [ 3955 "parameters": [
3969 {"type": "integer", "name": "requestId"}, 3956 {"type": "integer", "name": "requestId"},
3970 { 3957 {
3971 "type": "array", 3958 "type": "array",
3972 "description": "Array of suggest results", 3959 "description": "Array of suggest results",
3973 "items": { 3960 "items": {
3974 "$ref": "SuggestResult" 3961 "type": "object",
Matt Perry 2010/11/29 22:06:52 why this change?
Aaron Boodman 2010/11/30 01:13:57 The items send to sendSuggestions() have an extra
3962 "additionalProperties": { "type": "any" }
3975 } 3963 }
3976 } 3964 }
3977 ] 3965 ]
3978 }, 3966 },
3979 { 3967 {
3980 "name": "setDefaultSuggestion", 3968 "name": "setDefaultSuggestion",
3981 "type": "function", 3969 "type": "function",
3982 "description": "Sets the description and styling for the default suggest ion. The default suggestion is the text that is displayed in the first suggestio n row underneath the URL bar.", 3970 "description": "Sets the description and styling for the default suggest ion. The default suggestion is the text that is displayed in the first suggestio n row underneath the URL bar.",
3983 "parameters": [ 3971 "parameters": [
3984 { 3972 {
3985 "type": "object", 3973 "type": "object",
3986 "name": "suggestion", 3974 "name": "suggestion",
3987 "description": "A partial SuggestResult object, without the 'content ' parameter. See SuggestResult for a description of the parameters.", 3975 "description": "A partial SuggestResult object, without the 'content ' parameter. See SuggestResult for a description of the parameters.",
3988 "properties": { 3976 "properties": {
3989 » "description": { 3977 "description": {
3990 » "type": "string", 3978 "type": "string",
3991 » "minLength": 1, 3979 "minLength": 1,
3992 "description": "The text to display in the default suggestio n. The placeholder string '%s' can be included and will be replaced with the use r's input." 3980 "description": "The text to display in the default suggestion. T he placeholder string '%s' can be included and will be replaced with the user's input."
3993 » }, 3981 }
3994 » "descriptionStyles": {
3995 » "type": "array",
3996 » "optional": true,
3997 » "items": {
3998 » "type": "object",
3999 » "properties": {
4000 » "type": {"type": "string", "enum": ["url", "match", "dim "]},
4001 » "offset": {"type": "integer"},
4002 » "length": {"type": "integer", "optional": true}
4003 » }
4004 » }
4005 » }
4006 } 3982 }
4007 } 3983 }
4008 ] 3984 ]
4009 },
4010 {
4011 "name": "styleUrl",
4012 "type": "function",
4013 "description": "Constructor for the descriptionStyles parameter of the s uggest callback. This style designates a region of text matching a URL or filena me. A negative offset means the region will start at that many characters from t he end of the description. If length is omitted, the region will apply for the r est of the description text.",
4014 "parameters": [
4015 {"type": "integer", "name": "offset"},
4016 {"type": "integer", "name": "length", "minimum": 0, "optional": true}
4017 ]
4018 },
4019 {
4020 "name": "styleMatch",
4021 "type": "function",
4022 "description": "Constructor for the descriptionStyles parameter of the s uggest callback. This style designates a region of text matching what the user t yped. A negative offset means the region will start at that many characters from the end of the description. If length is omitted, the region will apply for the rest of the description text.",
4023 "parameters": [
4024 {"type": "integer", "name": "offset"},
4025 {"type": "integer", "name": "length", "minimum": 0, "optional": true}
4026 ]
4027 },
4028 {
4029 "name": "styleDim",
4030 "type": "function",
4031 "description": "Constructor for the descriptionStyles parameter of the s uggest callback. This style designates a region of dim helper text. A negative o ffset means the region will start at that many characters from the end of the de scription. If length is omitted, the region will apply for the rest of the descr iption text.",
4032 "parameters": [
4033 {"type": "integer", "name": "offset"},
4034 {"type": "integer", "name": "length", "minimum": 0, "optional": true}
4035 ]
4036 } 3985 }
4037 ], 3986 ],
4038 "events": [ 3987 "events": [
4039 { 3988 {
4040 "name": "onInputStarted", 3989 "name": "onInputStarted",
4041 "type": "function", 3990 "type": "function",
4042 "description": "User has started a keyword input session by typing the e xtension's keyword. This is guaranteed to be sent exactly once per input session , and before any onInputChanged events.", 3991 "description": "User has started a keyword input session by typing the e xtension's keyword. This is guaranteed to be sent exactly once per input session , and before any onInputChanged events.",
4043 "parameters": [] 3992 "parameters": []
4044 }, 3993 },
4045 { 3994 {
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
4415 "token": { "type": "string", "optional": true } 4364 "token": { "type": "string", "optional": true }
4416 } 4365 }
4417 } 4366 }
4418 ] 4367 ]
4419 } 4368 }
4420 ] 4369 ]
4421 } 4370 }
4422 ] 4371 ]
4423 } 4372 }
4424 ] 4373 ]
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698