OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 [ | 5 [ |
6 { | 6 { |
7 "namespace": "omnibox", | 7 "namespace": "omnibox", |
8 "description": "The omnibox API allows you to register a keyword with Google
Chrome's address bar, which is also known as the omnibox.", | 8 "description": "The omnibox API allows you to register a keyword with Google
Chrome's address bar, which is also known as the omnibox.", |
9 "types": [ | 9 "types": [ |
10 { | 10 { |
| 11 "id": "DescriptionStyleType", |
| 12 "type": "string", |
| 13 "description": "The style type.", |
| 14 "enum": ["url", "match", "dim"] |
| 15 }, |
| 16 { |
| 17 "id": "OnInputEnteredDisposition", |
| 18 "type": "string", |
| 19 "enum": ["currentTab", "newForegroundTab", "newBackgroundTab"], |
| 20 "description": "The window disposition for the omnibox query. This is th
e recommended context to display results. For example, if the omnibox command is
to navigate to a certain URL, a disposition of 'newForegroundTab' means the nav
igation should take place in a new selected tab." |
| 21 }, |
| 22 { |
11 "id": "SuggestResult", | 23 "id": "SuggestResult", |
12 "type": "object", | 24 "type": "object", |
13 "description": "A suggest result.", | 25 "description": "A suggest result.", |
14 "properties": { | 26 "properties": { |
15 "content": { | 27 "content": { |
16 "type": "string", | 28 "type": "string", |
17 "minLength": 1, | 29 "minLength": 1, |
18 "description": "The text that is put into the URL bar, and that is s
ent to the extension when the user chooses this entry." | 30 "description": "The text that is put into the URL bar, and that is s
ent to the extension when the user chooses this entry." |
19 }, | 31 }, |
20 "description": { | 32 "description": { |
21 "type": "string", | 33 "type": "string", |
22 "minLength": 1, | 34 "minLength": 1, |
23 "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>. You must escape the five predefined entities to display them
as text: stackoverflow.com/a/1091953/89484 " | 35 "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>. You must escape the five predefined entities to display them
as text: stackoverflow.com/a/1091953/89484 " |
24 }, | 36 }, |
25 "descriptionStyles": { | 37 "descriptionStyles": { |
26 "nodoc": true, | 38 "nodoc": true, |
27 "optional": true, | 39 "optional": true, |
28 "type": "array", | 40 "type": "array", |
29 "description": "An array of style ranges for the description, as pro
vided by the extension.", | 41 "description": "An array of style ranges for the description, as pro
vided by the extension.", |
30 "items": { | 42 "items": { |
31 "type": "object", | 43 "type": "object", |
32 "name": "matchClassification", | 44 "name": "matchClassification", |
33 "description": "The style ranges for the description, as provided
by the extension.", | 45 "description": "The style ranges for the description, as provided
by the extension.", |
34 "properties": { | 46 "properties": { |
35 "offset": { "type": "integer" }, | 47 "offset": { "type": "integer" }, |
36 "type": { "description": "The style type", "type": "string", "en
um": ["url", "match", "dim"]}, | 48 "type": { "description": "The style type", "$ref": "DescriptionS
tyleType"}, |
37 "length": { "type": "integer", "optional": true } | 49 "length": { "type": "integer", "optional": true } |
38 } | 50 } |
39 } | 51 } |
40 }, | 52 }, |
41 "descriptionStylesRaw": { | 53 "descriptionStylesRaw": { |
42 "nodoc": true, | 54 "nodoc": true, |
43 "optional": true, | 55 "optional": true, |
44 "type": "array", | 56 "type": "array", |
45 "description": "An array of style ranges for the description, as pro
vided by ToValue().", | 57 "description": "An array of style ranges for the description, as pro
vided by ToValue().", |
46 "items": { | 58 "items": { |
(...skipping 23 matching lines...) Expand all Loading... |
70 "nodoc": true, | 82 "nodoc": true, |
71 "optional": true, | 83 "optional": true, |
72 "type": "array", | 84 "type": "array", |
73 "description": "An array of style ranges for the description, as pro
vided by the extension.", | 85 "description": "An array of style ranges for the description, as pro
vided by the extension.", |
74 "items": { | 86 "items": { |
75 "type": "object", | 87 "type": "object", |
76 "name": "matchClassification", | 88 "name": "matchClassification", |
77 "description": "The style ranges for the description, as provided
by the extension.", | 89 "description": "The style ranges for the description, as provided
by the extension.", |
78 "properties": { | 90 "properties": { |
79 "offset": { "type": "integer" }, | 91 "offset": { "type": "integer" }, |
80 "type": { "description": "The style type", "type": "string", "en
um": ["url", "match", "dim"]}, | 92 "type": { "description": "The style type", "$ref": "DescriptionS
tyleType"}, |
81 "length": { "type": "integer", "optional": true } | 93 "length": { "type": "integer", "optional": true } |
82 } | 94 } |
83 } | 95 } |
84 }, | 96 }, |
85 "descriptionStylesRaw": { | 97 "descriptionStylesRaw": { |
86 "nodoc": true, | 98 "nodoc": true, |
87 "optional": true, | 99 "optional": true, |
88 "type": "array", | 100 "type": "array", |
89 "description": "An array of style ranges for the description, as pro
vided by ToValue().", | 101 "description": "An array of style ranges for the description, as pro
vided by ToValue().", |
90 "items": { | 102 "items": { |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 "name": "onInputEntered", | 180 "name": "onInputEntered", |
169 "type": "function", | 181 "type": "function", |
170 "description": "User has accepted what is typed into the omnibox.", | 182 "description": "User has accepted what is typed into the omnibox.", |
171 "parameters": [ | 183 "parameters": [ |
172 { | 184 { |
173 "type": "string", | 185 "type": "string", |
174 "name": "text" | 186 "name": "text" |
175 }, | 187 }, |
176 { | 188 { |
177 "name": "disposition", | 189 "name": "disposition", |
178 "type": "string", | 190 "$ref": "OnInputEnteredDisposition" |
179 "enum": ["currentTab", "newForegroundTab", "newBackgroundTab"], | |
180 "description": "The window disposition for the omnibox query. This i
s the recommended context to display results. For example, if the omnibox comman
d is to navigate to a certain URL, a disposition of 'newForegroundTab' means the
navigation should take place in a new selected tab." | |
181 } | 191 } |
182 ] | 192 ] |
183 }, | 193 }, |
184 { | 194 { |
185 "name": "onInputCancelled", | 195 "name": "onInputCancelled", |
186 "type": "function", | 196 "type": "function", |
187 "description": "User has ended the keyword input session without accepti
ng the input.", | 197 "description": "User has ended the keyword input session without accepti
ng the input.", |
188 "parameters": [] | 198 "parameters": [] |
189 } | 199 } |
190 ] | 200 ] |
191 } | 201 } |
192 ] | 202 ] |
OLD | NEW |