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.
7 * @fileoverview Definitions for the Chromium extensions API used by ChromeVox.
13 // TODO: Move these to //third_party/closure_compiler/externs.
15 // Begin auto generated externs; do not edit.
16 // The following was generated from:
18 // python tools/json_schema_compiler/compiler.py
20 // chrome/common/extensions/api/automation.idl
25 chrome.automation = {};
30 chrome.automation.EventType = {
31 activedescendantchanged: 'activedescendantchanged',
33 ariaAttributeChanged: 'ariaAttributeChanged',
34 autocorrectionOccured: 'autocorrectionOccured',
36 checkedStateChanged: 'checkedStateChanged',
37 childrenChanged: 'childrenChanged',
41 invalidStatusChanged: 'invalidStatusChanged',
42 layoutComplete: 'layoutComplete',
43 liveRegionChanged: 'liveRegionChanged',
44 loadComplete: 'loadComplete',
45 locationChanged: 'locationChanged',
47 menuListItemSelected: 'menuListItemSelected',
48 menuListValueChanged: 'menuListValueChanged',
49 menuPopupEnd: 'menuPopupEnd',
50 menuPopupStart: 'menuPopupStart',
51 menuStart: 'menuStart',
52 rowCollapsed: 'rowCollapsed',
53 rowCountChanged: 'rowCountChanged',
54 rowExpanded: 'rowExpanded',
55 scrollPositionChanged: 'scrollPositionChanged',
56 scrolledToAnchor: 'scrolledToAnchor',
57 selectedChildrenChanged: 'selectedChildrenChanged',
58 selection: 'selection',
59 selectionAdd: 'selectionAdd',
60 selectionRemove: 'selectionRemove',
62 textChanged: 'textChanged',
63 textSelectionChanged: 'textSelectionChanged',
64 treeChanged: 'treeChanged',
65 valueChanged: 'valueChanged',
71 chrome.automation.RoleType = {
72 alertDialog: 'alertDialog',
74 annotation: 'annotation',
75 application: 'application',
78 blockquote: 'blockquote',
79 busyIndicator: 'busyIndicator',
81 buttonDropDown: 'buttonDropDown',
87 colorWell: 'colorWell',
88 columnHeader: 'columnHeader',
91 complementary: 'complementary',
92 contentInfo: 'contentInfo',
95 definition: 'definition',
96 descriptionListDetail: 'descriptionListDetail',
97 descriptionList: 'descriptionList',
98 descriptionListTerm: 'descriptionListTerm',
102 directory: 'directory',
103 disclosureTriangle: 'disclosureTriangle',
105 document: 'document',
106 embeddedObject: 'embeddedObject',
107 figcaption: 'figcaption',
115 iframePresentational: 'iframePresentational',
117 imageMapLink: 'imageMapLink',
118 imageMap: 'imageMap',
120 inlineTextBox: 'inlineTextBox',
121 labelText: 'labelText',
123 lineBreak: 'lineBreak',
125 listBoxOption: 'listBoxOption',
127 listItem: 'listItem',
128 listMarker: 'listMarker',
130 locationBar: 'locationBar',
136 menuButton: 'menuButton',
137 menuItem: 'menuItem',
138 menuItemCheckBox: 'menuItemCheckBox',
139 menuItemRadio: 'menuItemRadio',
140 menuListOption: 'menuListOption',
141 menuListPopup: 'menuListPopup',
144 navigation: 'navigation',
148 paragraph: 'paragraph',
149 popUpButton: 'popUpButton',
151 presentational: 'presentational',
152 progressIndicator: 'progressIndicator',
153 radioButton: 'radioButton',
154 radioGroup: 'radioGroup',
156 rootWebArea: 'rootWebArea',
157 rowHeader: 'rowHeader',
162 scrollArea: 'scrollArea',
163 scrollBar: 'scrollBar',
164 seamlessWebArea: 'seamlessWebArea',
166 searchBox: 'searchBox',
168 sliderThumb: 'sliderThumb',
169 spinButtonPart: 'spinButtonPart',
170 spinButton: 'spinButton',
171 splitter: 'splitter',
172 staticText: 'staticText',
175 tabGroup: 'tabGroup',
177 tabPanel: 'tabPanel',
179 tableHeaderContainer: 'tableHeaderContainer',
181 textField: 'textField',
184 titleBar: 'titleBar',
185 toggleButton: 'toggleButton',
187 treeGrid: 'treeGrid',
188 treeItem: 'treeItem',
200 chrome.automation.StateType = {
203 collapsed: 'collapsed',
205 disabled: 'disabled',
206 editable: 'editable',
208 expanded: 'expanded',
209 focusable: 'focusable',
211 haspopup: 'haspopup',
212 horizontal: 'horizontal',
214 indeterminate: 'indeterminate',
215 invisible: 'invisible',
217 multiselectable: 'multiselectable',
218 offscreen: 'offscreen',
220 protected: 'protected',
221 readOnly: 'readOnly',
222 required: 'required',
223 selectable: 'selectable',
224 selected: 'selected',
225 vertical: 'vertical',
232 chrome.automation.TreeChangeType = {
233 nodeCreated: 'nodeCreated',
234 subtreeCreated: 'subtreeCreated',
235 nodeChanged: 'nodeChanged',
236 nodeRemoved: 'nodeRemoved',
247 chrome.automation.Rect;
251 * role: (!chrome.automation.RoleType|undefined),
252 * state: (Object|undefined),
253 * attributes: (Object|undefined)
256 chrome.automation.FindParams;
261 chrome.automation.AutomationEvent = function() {};
265 * target: chrome.automation.AutomationNode,
266 * type: !chrome.automation.TreeChangeType
269 chrome.automation.TreeChange;
274 chrome.automation.AutomationNode = function() {};
278 * Get the automation tree for the tab with the given tabId, or the current tab
279 * if no tabID is given, enabling automation if necessary. Returns a tree with a
280 * placeholder root node; listen for the "loadComplete" event to get a
281 * notification that the tree has fully loaded (the previous root node reference
282 * will stop working at or before this point).
283 * @param {number} tabId
284 * @param {function(chrome.automation.AutomationNode):void} callback
285 * Called when the <code>AutomationNode</code> for the page is available.
287 chrome.automation.getTree = function(tabId, callback) {};
290 * Get the automation tree for the whole desktop which consists of all on screen
291 * views. Note this API is currently only supported on Chrome OS.
292 * @param {function(chrome.automation.AutomationNode):void} callback
293 * Called when the <code>AutomationNode</code> for the page is available.
295 chrome.automation.getDesktop = function(callback) {};
298 * Add a tree change observer. Tree change observers are static/global,
299 * they listen to tree changes across all trees.
300 * @param {function(chrome.automation.TreeChange):void} observer
301 * A listener for tree changes on the <code>AutomationNode</code> tree.
303 chrome.automation.addTreeChangeObserver = function(observer) {};
306 * Remove a tree change observer.
307 * @param {function(chrome.automation.TreeChange):void} observer
308 * A listener for tree changes on the <code>AutomationNode</code> tree.
310 chrome.automation.removeTreeChangeObserver = function(observer) {};
313 // End auto generated externs; do not edit.
319 * @type {chrome.automation.RoleType}
321 chrome.automation.AutomationNode.prototype.role;
325 * @type {!Object<chrome.automation.StateType, boolean>}
327 chrome.automation.AutomationNode.prototype.state;
333 chrome.automation.AutomationNode.prototype.indexInParent;
339 chrome.automation.AutomationNode.prototype.name;
344 chrome.automation.AutomationNode.prototype.description;
350 chrome.automation.AutomationNode.prototype.url;
356 chrome.automation.AutomationNode.prototype.docUrl;
362 chrome.automation.AutomationNode.prototype.value;
368 chrome.automation.AutomationNode.prototype.textSelStart;
374 chrome.automation.AutomationNode.prototype.textSelEnd;
378 * @type {Array<number>}
380 chrome.automation.AutomationNode.prototype.wordStarts;
384 * @type {Array<number>}
386 chrome.automation.AutomationNode.prototype.wordEnds;
390 * @type {!chrome.automation.AutomationNode}
392 chrome.automation.AutomationNode.prototype.root;
396 * @type {chrome.automation.AutomationNode}
398 chrome.automation.AutomationNode.prototype.firstChild;
402 * @type {chrome.automation.AutomationNode}
404 chrome.automation.AutomationNode.prototype.lastChild;
408 * @type {chrome.automation.AutomationNode}
410 chrome.automation.AutomationNode.prototype.nextSibling;
414 * @type {chrome.automation.AutomationNode}
416 chrome.automation.AutomationNode.prototype.previousSibling;
420 * @type {chrome.automation.AutomationNode}
422 chrome.automation.AutomationNode.prototype.parent;
426 * @type {!Array<chrome.automation.AutomationNode>}
428 chrome.automation.AutomationNode.prototype.children;
432 * @type {{top: number, left: number, height: number, width: number}}
434 chrome.automation.AutomationNode.prototype.location;
438 * @param {chrome.automation.EventType} eventType
439 * @param {function(chrome.automation.AutomationNode) : void} callback
440 * @param {boolean} capture
442 chrome.automation.AutomationNode.prototype.addEventListener =
443 function(eventType, callback, capture) {};
447 * @param {chrome.automation.EventType} eventType
448 * @param {function(chrome.automation.AutomationNode) : void} callback
449 * @param {boolean} capture
451 chrome.automation.AutomationNode.prototype.removeEventListener =
452 function(eventType, callback, capture) {};
456 * @type {chrome.automation.AutomationNode}
458 chrome.automation.TreeChange.prototype.target;
462 * @type {chrome.automation.TreeChangeType}
464 chrome.automation.TreeChange.prototype.type;
468 * @param {function(chrome.automation.TreeChange) : void}
471 chrome.automation.AutomationNode.prototype.addTreeChangeObserver =
472 function(callback) {};
476 * @param {function(chrome.automation.TreeChange) : void}
479 chrome.automation.AutomationNode.prototype.removeTreeChangeObserver =
480 function(callback) {};
483 chrome.automation.AutomationNode.prototype.doDefault = function() {};
486 chrome.automation.AutomationNode.prototype.focus = function() {};
489 chrome.automation.AutomationNode.prototype.showContextMenu = function() {};
493 * @param {number} start
494 * @param {number} end
496 chrome.automation.AutomationNode.prototype.setSelection =
497 function(start, end) {};
500 /** @type {string} */
501 chrome.automation.AutomationNode.prototype.containerLiveStatus;
503 /** @type {string} */
504 chrome.automation.AutomationNode.prototype.containerLiveRelevant;
506 /** @type {boolean} */
507 chrome.automation.AutomationNode.prototype.containerLiveAtomic;
509 /** @type {boolean} */
510 chrome.automation.AutomationNode.prototype.containerLiveBusy;
514 * @param {Object} findParams
516 chrome.automation.AutomationNode.prototype.find = function(findParams) {};