OLD | NEW |
| (Empty) |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 [ | |
6 { | |
7 "namespace": "accessibilityPrivate", | |
8 "compiler_options": { | |
9 "implemented_in": "chrome/browser/accessibility/accessibility_extension_ap
i.h" | |
10 }, | |
11 "description": "none", | |
12 "types": [ | |
13 { | |
14 "id": "CheckboxDetails", | |
15 "type": "object", | |
16 "description": "Information about the state of a checkbox.", | |
17 "properties": { | |
18 "isChecked": {"type": "boolean", "description": "True if this checkbox
is checked."} | |
19 } | |
20 }, | |
21 { | |
22 "id": "ComboBoxDetails", | |
23 "type": "object", | |
24 "description": "Information about the state of a combo box.", | |
25 "properties": { | |
26 "value": {"type": "string", "description": "The value of the combo box
."}, | |
27 "itemCount": {"type": "integer", "description": "The number of items i
n the combo box's list."}, | |
28 "itemIndex": {"type": "integer", "description": "The 0-based index of
the current value, or -1 if the user entered a value not from the list."} | |
29 } | |
30 }, | |
31 { | |
32 "id": "ListBoxDetails", | |
33 "type": "object", | |
34 "description": "Information about the state of a list box.", | |
35 "properties": { | |
36 "value": {"type": "string", "description": "The value of the list box.
"}, | |
37 "itemCount": {"type": "integer", "description": "The number of items i
n the list."}, | |
38 "itemIndex": {"type": "integer", "description": "The 0-based index of
the selected value, or -1 if no items are selected."} | |
39 } | |
40 }, | |
41 { | |
42 "id": "MenuDetails", | |
43 "type": "object", | |
44 "description": "Information about the state of a drop-down menu.", | |
45 "properties": { | |
46 } | |
47 }, | |
48 { | |
49 "id": "MenuItemDetails", | |
50 "type": "object", | |
51 "description": "Information about a menu item.", | |
52 "properties": { | |
53 "hasSubmenu": {"type": "boolean", "description": "True if this item op
ens a submenu."}, | |
54 "itemCount": {"type": "integer", "description": "The number of items i
n the menu."}, | |
55 "itemIndex": {"type": "integer", "description": "The 0-based index of
this menu item."} | |
56 } | |
57 }, | |
58 { | |
59 "id": "RadioButtonDetails", | |
60 "type": "object", | |
61 "description": "Information about the state of a radio button.", | |
62 "properties": { | |
63 "isChecked": {"type": "boolean", "description": "True if this radio bu
tton is checked."}, | |
64 "itemCount": {"type": "integer", "description": "The number of radio b
uttons in this group."}, | |
65 "itemIndex": {"type": "integer", "description": "The 0-based index of
this radio button in this group."} | |
66 } | |
67 }, | |
68 { | |
69 "id": "SliderDetails", | |
70 "type": "object", | |
71 "description": "Information about the state of a slider.", | |
72 "properties": { | |
73 "stringValue": {"type": "string", "description": "The value of the sli
der as a string."} | |
74 } | |
75 }, | |
76 { | |
77 "id": "TabDetails", | |
78 "type": "object", | |
79 "description": "Additional accessibility information about a tab.", | |
80 "properties": { | |
81 "itemCount": {"type": "integer", "description": "The number of tabs in
this group."}, | |
82 "itemIndex": {"type": "integer", "description": "The 0-based index of
this tab in this group."} | |
83 } | |
84 }, | |
85 { | |
86 "id": "TextBoxDetails", | |
87 "type": "object", | |
88 "description": "Information about the state of a text box.", | |
89 "properties": { | |
90 "value": {"type": "string", "description": "The value of the text box
- the entered text."}, | |
91 "isPassword": {"type": "boolean", "description": "True if this control
contains password text whose contents should be obscured."}, | |
92 "selectionStart": {"type": "integer", "description": "The index of the
character where the selection starts, if this control contains editable text."}
, | |
93 "selectionEnd": {"type": "integer", "description": "The index of the c
haracter where the selection ends, if this control contains editable text."} | |
94 } | |
95 }, | |
96 { | |
97 "id": "TreeDetails", | |
98 "type": "object", | |
99 "description": "Information about the state of a tree control.", | |
100 "properties": { | |
101 } | |
102 }, | |
103 { | |
104 "id": "TreeItemDetails", | |
105 "type": "object", | |
106 "description": "Information about a selected tree control item.", | |
107 "properties": { | |
108 "itemDepth": {"type": "integer", "description": "The 0-based depth of
this tree item."}, | |
109 "itemCount": {"type": "integer", "description": "The number of items i
n the current depth."}, | |
110 "itemIndex": {"type": "integer", "description": "The 0-based index of
this tree item at the current tree depth."}, | |
111 "childrenCount": {"type": "integer", "description": "The number of chi
ldren of the current tree item."}, | |
112 "isItemExpanded": {"type": "boolean", "description": "True if this if
this tree item is expanded."} | |
113 } | |
114 }, | |
115 { | |
116 "id": "AlertInfo", | |
117 "type": "object", | |
118 "description": "Information about an alert", | |
119 "properties": { | |
120 "message": { | |
121 "type": "string", | |
122 "description": "The message the alert is showing." | |
123 } | |
124 } | |
125 }, | |
126 { | |
127 "id": "AccessibilityObject", | |
128 "type": "object", | |
129 "description": "Parent class for accessibility information about an obje
ct.", | |
130 "properties": { | |
131 "type": { | |
132 "type": "string", | |
133 "description": "The type of this object, which determines the conten
ts of 'details'.", | |
134 "enum": ["alert", "button", "checkbox", "combobox", "link", "menu",
"menuitem", "radiobutton", "slider", "tab", "textbox", "tree", "treeitem", "wind
ow"] | |
135 }, | |
136 "name": { | |
137 "type": "string", | |
138 "description": "The localized name of the object, like OK or Passwor
d. Do not rely on an exact string match because the text will be in the user's l
anguage and may change in the future." | |
139 }, | |
140 "context": { | |
141 "type": "string", | |
142 "description": "The localized name of the context for the object, li
ke the name of the surrounding toolbar or group of controls.", | |
143 "optional": true | |
144 }, | |
145 "details": { | |
146 "description": "Other details like the state, depending on the type
of object.", | |
147 "optional": true, | |
148 "choices": [ | |
149 { "$ref": "CheckboxDetails" }, | |
150 { "$ref": "ComboBoxDetails" }, | |
151 { "$ref": "MenuDetails" }, | |
152 { "$ref": "MenuItemDetails" }, | |
153 { "$ref": "RadioButtonDetails" }, | |
154 { "$ref": "SliderDetails" }, | |
155 { "$ref": "TabDetails" }, | |
156 { "$ref": "TextBoxDetails" }, | |
157 { "$ref": "TreeDetails" }, | |
158 { "$ref": "TreeItemDetails" } | |
159 ] | |
160 } | |
161 } | |
162 } | |
163 ], | |
164 "functions": [ | |
165 { | |
166 "name": "setAccessibilityEnabled", | |
167 "type": "function", | |
168 "description": "Enables or disables the accessibility extension api. Thi
s must be set to true before event listeners or getFocusedControl will work.", | |
169 "parameters": [ | |
170 { | |
171 "type": "boolean", | |
172 "name": "enabled", | |
173 "description": "True if accessibility support should be enabled." | |
174 } | |
175 ] | |
176 }, | |
177 { | |
178 "name": "setNativeAccessibilityEnabled", | |
179 "type": "function", | |
180 "description": "Enables or disables native accessibility support. Once d
isabled, it is up to the calling extension to provide accessibility for web cont
ents.", | |
181 "parameters": [ | |
182 { | |
183 "type": "boolean", | |
184 "name": "enabled", | |
185 "description": "True if native accessibility support should be enabl
ed." | |
186 } | |
187 ] | |
188 }, | |
189 { | |
190 "name": "getFocusedControl", | |
191 "type": "function", | |
192 "description": "Gets information about the currently focused control.", | |
193 "parameters": [ | |
194 { | |
195 "type": "function", | |
196 "name": "callback", | |
197 "parameters": [ | |
198 { | |
199 "name": "control", | |
200 "description": "Details of the currently focused control, or nul
l if nothing is focused.", | |
201 "$ref": "AccessibilityObject", | |
202 "optional": true | |
203 } | |
204 ] | |
205 } | |
206 ] | |
207 }, | |
208 { | |
209 "name": "getAlertsForTab", | |
210 "type": "function", | |
211 "description": "Gets alerts being shown on the given tab.", | |
212 "parameters": [ | |
213 { | |
214 "name": "tabId", | |
215 "type": "integer", | |
216 "minimum": 0 | |
217 }, | |
218 { | |
219 "type": "function", | |
220 "name": "callback", | |
221 "parameters": [ | |
222 { | |
223 "name": "alerts", | |
224 "type": "array", | |
225 "items": { "$ref": "AlertInfo" }, | |
226 "description": "Alerts being shown on the given tab." | |
227 } | |
228 ] | |
229 } | |
230 ] | |
231 } | |
232 ], | |
233 "events": [ | |
234 { | |
235 "name": "onWindowOpened", | |
236 "type": "function", | |
237 "description": "Fired when a window is opened.", | |
238 "parameters": [ | |
239 { | |
240 "$ref": "AccessibilityObject", | |
241 "name": "window", | |
242 "description": "Information about the window that was opened." | |
243 } | |
244 ] | |
245 }, | |
246 { | |
247 "name": "onWindowClosed", | |
248 "type": "function", | |
249 "description": "Fired when a window is closed.", | |
250 "parameters": [ | |
251 { | |
252 "$ref": "AccessibilityObject", | |
253 "name": "window", | |
254 "description": "Information about the window that was closed." | |
255 } | |
256 ] | |
257 }, | |
258 { | |
259 "name": "onControlFocused", | |
260 "type": "function", | |
261 "description": "Fired when a control is focused.", | |
262 "parameters": [ | |
263 { | |
264 "$ref": "AccessibilityObject", | |
265 "name": "control", | |
266 "description": "Details of the control that was focused." | |
267 } | |
268 ] | |
269 }, | |
270 { | |
271 "name": "onControlAction", | |
272 "type": "function", | |
273 "description": "Fired when a control's action is taken, like pressing a
button or toggling a checkbox.", | |
274 "parameters": [ | |
275 { | |
276 "$ref": "AccessibilityObject", | |
277 "name": "control", | |
278 "description": "Details of the control whose action was taken." | |
279 } | |
280 ] | |
281 }, | |
282 { | |
283 "name": "onTextChanged", | |
284 "type": "function", | |
285 "description": "Fired when text changes in an editable text control.", | |
286 "parameters": [ | |
287 { | |
288 "$ref": "AccessibilityObject", | |
289 "name": "control", | |
290 "description": "Details of the control where the text changed." | |
291 } | |
292 ] | |
293 }, | |
294 { | |
295 "name": "onMenuOpened", | |
296 "type": "function", | |
297 "description": "Fired when a menu is opened.", | |
298 "parameters": [ | |
299 { | |
300 "$ref": "AccessibilityObject", | |
301 "name": "menu", | |
302 "description": "Information about the menu that was opened." | |
303 } | |
304 ] | |
305 }, | |
306 { | |
307 "name": "onMenuClosed", | |
308 "type": "function", | |
309 "description": "Fired when a menu is closed.", | |
310 "parameters": [ | |
311 { | |
312 "$ref": "AccessibilityObject", | |
313 "name": "menu", | |
314 "description": "Information about the menu that was closed." | |
315 } | |
316 ] | |
317 }, | |
318 { | |
319 "name": "onChromeVoxLoadStateChanged", | |
320 "type": "function", | |
321 "description": "Fired ChromeVox load state changes.", | |
322 "parameters": [ | |
323 { | |
324 "type": "boolean", | |
325 "name": "loading", | |
326 "description": "True if ChromeVox is loading; false if ChromeVox is
unloading." | |
327 }, | |
328 { | |
329 "type": "boolean", | |
330 "name": "makeAnnouncements", | |
331 "description": "Whether to make introductory announcements." | |
332 } | |
333 ] | |
334 } | |
335 ] | |
336 } | |
337 ] | |
OLD | NEW |