Chromium Code Reviews| Index: third_party/closure_compiler/externs/automation.js |
| diff --git a/third_party/closure_compiler/externs/automation.js b/third_party/closure_compiler/externs/automation.js |
| index fd080cbb1195544e0318db209ba24e453fdde400..c9fc81fc9590b45b49122cad1bd5944cc538cf2d 100644 |
| --- a/third_party/closure_compiler/externs/automation.js |
| +++ b/third_party/closure_compiler/externs/automation.js |
| @@ -1,14 +1,12 @@ |
| -// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| // This file was generated by: |
| -// tools/json_schema_compiler/compiler.py -g externs |
| -// chrome/common/extensions/api/automation.idl |
| -// |
| -// Further edits were applied by hand due to bugs / limitations in |
| -// json_schema_compiler. |
| -// |
| +// tools/json_schema_compiler/compiler.py. |
| +// NOTE: The format of types has changed. 'FooType' is now |
| +// 'chrome.automation.FooType'. |
| +// Please run the closure compiler before committing changes. |
| // See https://chromium.googlesource.com/chromium/src/+/master/docs/closure_compilation.md |
| /** @fileoverview Externs generated from namespace: automation */ |
| @@ -20,248 +18,244 @@ chrome.automation = {}; |
| /** |
| * @enum {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-EventType |
| */ |
| chrome.automation.EventType = { |
| - activedescendantchanged: '', |
| - alert: '', |
| - ariaAttributeChanged: '', |
| - autocorrectionOccured: '', |
| - blur: '', |
| - checkedStateChanged: '', |
| - childrenChanged: '', |
| - documentSelectionChanged: '', |
| - expandedChanged: '', |
| - focus: '', |
| - hide: '', |
| - hover: '', |
| - invalidStatusChanged: '', |
| - layoutComplete: '', |
| - liveRegionChanged: '', |
| - loadComplete: '', |
| - locationChanged: '', |
| - menuEnd: '', |
| - menuListItemSelected: '', |
| - menuListValueChanged: '', |
| - menuPopupEnd: '', |
| - menuPopupStart: '', |
| - menuStart: '', |
| - mouseCanceled: '', |
| - mouseDragged: '', |
| - mouseMoved: '', |
| - mousePressed: '', |
| - mouseReleased: '', |
| - rowCollapsed: '', |
| - rowCountChanged: '', |
| - rowExpanded: '', |
| - scrollPositionChanged: '', |
| - scrolledToAnchor: '', |
| - selectedChildrenChanged: '', |
| - selection: '', |
| - selectionAdd: '', |
| - selectionRemove: '', |
| - show: '', |
| - textChanged: '', |
| - textSelectionChanged: '', |
| - treeChanged: '', |
| - valueChanged: '', |
| + ACTIVEDESCENDANTCHANGED: 'activedescendantchanged', |
| + ALERT: 'alert', |
| + ARIA_ATTRIBUTE_CHANGED: 'ariaAttributeChanged', |
| + AUTOCORRECTION_OCCURED: 'autocorrectionOccured', |
| + BLUR: 'blur', |
| + CHECKED_STATE_CHANGED: 'checkedStateChanged', |
| + CHILDREN_CHANGED: 'childrenChanged', |
| + CLICKED: 'clicked', |
| + DOCUMENT_SELECTION_CHANGED: 'documentSelectionChanged', |
| + EXPANDED_CHANGED: 'expandedChanged', |
| + FOCUS: 'focus', |
| + IMAGE_FRAME_UPDATED: 'imageFrameUpdated', |
| + HIDE: 'hide', |
| + HOVER: 'hover', |
| + INVALID_STATUS_CHANGED: 'invalidStatusChanged', |
| + LAYOUT_COMPLETE: 'layoutComplete', |
| + LIVE_REGION_CREATED: 'liveRegionCreated', |
| + LIVE_REGION_CHANGED: 'liveRegionChanged', |
| + LOAD_COMPLETE: 'loadComplete', |
| + LOCATION_CHANGED: 'locationChanged', |
| + MEDIA_STARTED_PLAYING: 'mediaStartedPlaying', |
| + MEDIA_STOPPED_PLAYING: 'mediaStoppedPlaying', |
| + MENU_END: 'menuEnd', |
| + MENU_LIST_ITEM_SELECTED: 'menuListItemSelected', |
| + MENU_LIST_VALUE_CHANGED: 'menuListValueChanged', |
| + MENU_POPUP_END: 'menuPopupEnd', |
| + MENU_POPUP_START: 'menuPopupStart', |
| + MENU_START: 'menuStart', |
| + MOUSE_CANCELED: 'mouseCanceled', |
| + MOUSE_DRAGGED: 'mouseDragged', |
| + MOUSE_MOVED: 'mouseMoved', |
| + MOUSE_PRESSED: 'mousePressed', |
| + MOUSE_RELEASED: 'mouseReleased', |
| + ROW_COLLAPSED: 'rowCollapsed', |
| + ROW_COUNT_CHANGED: 'rowCountChanged', |
| + ROW_EXPANDED: 'rowExpanded', |
| + SCROLL_POSITION_CHANGED: 'scrollPositionChanged', |
| + SCROLLED_TO_ANCHOR: 'scrolledToAnchor', |
| + SELECTED_CHILDREN_CHANGED: 'selectedChildrenChanged', |
| + SELECTION: 'selection', |
| + SELECTION_ADD: 'selectionAdd', |
| + SELECTION_REMOVE: 'selectionRemove', |
| + SHOW: 'show', |
| + TEXT_CHANGED: 'textChanged', |
| + TEXT_SELECTION_CHANGED: 'textSelectionChanged', |
| + TREE_CHANGED: 'treeChanged', |
| + VALUE_CHANGED: 'valueChanged', |
| }; |
| /** |
| * @enum {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-RoleType |
| */ |
| chrome.automation.RoleType = { |
| - alertDialog: '', |
| - alert: '', |
| - annotation: '', |
| - application: '', |
| - article: '', |
| - banner: '', |
| - blockquote: '', |
| - busyIndicator: '', |
| - button: '', |
| - buttonDropDown: '', |
| - canvas: '', |
| - caption: '', |
| - cell: '', |
| - checkBox: '', |
| - client: '', |
| - colorWell: '', |
| - columnHeader: '', |
| - column: '', |
| - comboBox: '', |
| - complementary: '', |
| - contentInfo: '', |
| - date: '', |
| - dateTime: '', |
| - definition: '', |
| - descriptionListDetail: '', |
| - descriptionList: '', |
| - descriptionListTerm: '', |
| - desktop: '', |
| - details: '', |
| - dialog: '', |
| - directory: '', |
| - disclosureTriangle: '', |
| - div: '', |
| - document: '', |
| - embeddedObject: '', |
| - figcaption: '', |
| - figure: '', |
| - footer: '', |
| - form: '', |
| - grid: '', |
| - group: '', |
| - heading: '', |
| - iframe: '', |
| - iframePresentational: '', |
| - ignored: '', |
| - imageMapLink: '', |
| - imageMap: '', |
| - image: '', |
| - inlineTextBox: '', |
| - labelText: '', |
| - legend: '', |
| - lineBreak: '', |
| - link: '', |
| - listBoxOption: '', |
| - listBox: '', |
| - listItem: '', |
| - listMarker: '', |
| - list: '', |
| - locationBar: '', |
| - log: '', |
| - main: '', |
| - marquee: '', |
| - math: '', |
| - menuBar: '', |
| - menuButton: '', |
| - menuItem: '', |
| - menuItemCheckBox: '', |
| - menuItemRadio: '', |
| - menuListOption: '', |
| - menuListPopup: '', |
| - menu: '', |
| - meter: '', |
| - navigation: '', |
| - note: '', |
| - outline: '', |
| - pane: '', |
| - paragraph: '', |
| - popUpButton: '', |
| - pre: '', |
| - presentational: '', |
| - progressIndicator: '', |
| - radioButton: '', |
| - radioGroup: '', |
| - region: '', |
| - rootWebArea: '', |
| - rowHeader: '', |
| - row: '', |
| - ruby: '', |
| - ruler: '', |
| - svgRoot: '', |
| - scrollArea: '', |
| - scrollBar: '', |
| - seamlessWebArea: '', |
| - search: '', |
| - searchBox: '', |
| - slider: '', |
| - sliderThumb: '', |
| - spinButtonPart: '', |
| - spinButton: '', |
| - splitter: '', |
| - staticText: '', |
| - status: '', |
| - switch: '', |
| - tabGroup: '', |
| - tabList: '', |
| - tabPanel: '', |
| - tab: '', |
| - tableHeaderContainer: '', |
| - table: '', |
| - textField: '', |
| - time: '', |
| - timer: '', |
| - titleBar: '', |
| - toggleButton: '', |
| - toolbar: '', |
| - treeGrid: '', |
| - treeItem: '', |
| - tree: '', |
| - unknown: '', |
| - tooltip: '', |
| - webArea: '', |
| - webView: '', |
| - window: '', |
| + ABBR: 'abbr', |
| + ALERT_DIALOG: 'alertDialog', |
| + ALERT: 'alert', |
| + ANNOTATION: 'annotation', |
| + APPLICATION: 'application', |
| + ARTICLE: 'article', |
| + AUDIO: 'audio', |
| + BANNER: 'banner', |
| + BLOCKQUOTE: 'blockquote', |
| + BUSY_INDICATOR: 'busyIndicator', |
| + BUTTON: 'button', |
| + BUTTON_DROP_DOWN: 'buttonDropDown', |
| + CANVAS: 'canvas', |
| + CAPTION: 'caption', |
| + CELL: 'cell', |
| + CHECK_BOX: 'checkBox', |
| + CLIENT: 'client', |
| + COLOR_WELL: 'colorWell', |
| + COLUMN_HEADER: 'columnHeader', |
| + COLUMN: 'column', |
| + COMBO_BOX: 'comboBox', |
| + COMPLEMENTARY: 'complementary', |
| + CONTENT_INFO: 'contentInfo', |
| + DATE: 'date', |
| + DATE_TIME: 'dateTime', |
| + DEFINITION: 'definition', |
| + DESCRIPTION_LIST_DETAIL: 'descriptionListDetail', |
| + DESCRIPTION_LIST: 'descriptionList', |
| + DESCRIPTION_LIST_TERM: 'descriptionListTerm', |
| + DESKTOP: 'desktop', |
| + DETAILS: 'details', |
| + DIALOG: 'dialog', |
| + DIRECTORY: 'directory', |
| + DISCLOSURE_TRIANGLE: 'disclosureTriangle', |
| + DIV: 'div', |
| + DOCUMENT: 'document', |
| + EMBEDDED_OBJECT: 'embeddedObject', |
| + FEED: 'feed', |
| + FIGCAPTION: 'figcaption', |
| + FIGURE: 'figure', |
| + FOOTER: 'footer', |
| + FORM: 'form', |
| + GRID: 'grid', |
| + GROUP: 'group', |
| + HEADING: 'heading', |
| + IFRAME: 'iframe', |
| + IFRAME_PRESENTATIONAL: 'iframePresentational', |
| + IGNORED: 'ignored', |
| + IMAGE_MAP_LINK: 'imageMapLink', |
| + IMAGE_MAP: 'imageMap', |
| + IMAGE: 'image', |
| + INLINE_TEXT_BOX: 'inlineTextBox', |
| + INPUT_TIME: 'inputTime', |
| + LABEL_TEXT: 'labelText', |
| + LEGEND: 'legend', |
| + LINE_BREAK: 'lineBreak', |
| + LINK: 'link', |
| + LIST_BOX_OPTION: 'listBoxOption', |
| + LIST_BOX: 'listBox', |
| + LIST_ITEM: 'listItem', |
| + LIST_MARKER: 'listMarker', |
| + LIST: 'list', |
| + LOCATION_BAR: 'locationBar', |
| + LOG: 'log', |
| + MAIN: 'main', |
| + MARK: 'mark', |
| + MARQUEE: 'marquee', |
| + MATH: 'math', |
| + MENU_BAR: 'menuBar', |
| + MENU_BUTTON: 'menuButton', |
| + MENU_ITEM: 'menuItem', |
| + MENU_ITEM_CHECK_BOX: 'menuItemCheckBox', |
| + MENU_ITEM_RADIO: 'menuItemRadio', |
| + MENU_LIST_OPTION: 'menuListOption', |
| + MENU_LIST_POPUP: 'menuListPopup', |
| + MENU: 'menu', |
| + METER: 'meter', |
| + NAVIGATION: 'navigation', |
| + NOTE: 'note', |
| + OUTLINE: 'outline', |
| + PANE: 'pane', |
| + PARAGRAPH: 'paragraph', |
| + POP_UP_BUTTON: 'popUpButton', |
| + PRE: 'pre', |
| + PRESENTATIONAL: 'presentational', |
| + PROGRESS_INDICATOR: 'progressIndicator', |
| + RADIO_BUTTON: 'radioButton', |
| + RADIO_GROUP: 'radioGroup', |
| + REGION: 'region', |
| + ROOT_WEB_AREA: 'rootWebArea', |
| + ROW_HEADER: 'rowHeader', |
| + ROW: 'row', |
| + RUBY: 'ruby', |
| + RULER: 'ruler', |
| + SVG_ROOT: 'svgRoot', |
| + SCROLL_AREA: 'scrollArea', |
| + SCROLL_BAR: 'scrollBar', |
| + SEAMLESS_WEB_AREA: 'seamlessWebArea', |
| + SEARCH: 'search', |
| + SEARCH_BOX: 'searchBox', |
| + SLIDER: 'slider', |
| + SLIDER_THUMB: 'sliderThumb', |
| + SPIN_BUTTON_PART: 'spinButtonPart', |
| + SPIN_BUTTON: 'spinButton', |
| + SPLITTER: 'splitter', |
| + STATIC_TEXT: 'staticText', |
| + STATUS: 'status', |
| + SWITCH: 'switch', |
| + TAB_GROUP: 'tabGroup', |
| + TAB_LIST: 'tabList', |
| + TAB_PANEL: 'tabPanel', |
| + TAB: 'tab', |
| + TABLE_HEADER_CONTAINER: 'tableHeaderContainer', |
| + TABLE: 'table', |
| + TERM: 'term', |
| + TEXT_FIELD: 'textField', |
| + TIME: 'time', |
| + TIMER: 'timer', |
| + TITLE_BAR: 'titleBar', |
| + TOGGLE_BUTTON: 'toggleButton', |
| + TOOLBAR: 'toolbar', |
| + TREE_GRID: 'treeGrid', |
| + TREE_ITEM: 'treeItem', |
| + TREE: 'tree', |
| + UNKNOWN: 'unknown', |
| + TOOLTIP: 'tooltip', |
| + VIDEO: 'video', |
| + WEB_AREA: 'webArea', |
| + WEB_VIEW: 'webView', |
| + WINDOW: 'window', |
| }; |
| /** |
| * @enum {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-StateType |
| */ |
| chrome.automation.StateType = { |
| - busy: '', |
| - checked: '', |
| - collapsed: '', |
| - default: '', |
| - disabled: '', |
| - editable: '', |
| - expanded: '', |
| - focusable: '', |
| - focused: '', |
| - haspopup: '', |
| - horizontal: '', |
| - hovered: '', |
| - indeterminate: '', |
| - invisible: '', |
| - linked: '', |
| - multiline: '', |
| - multiselectable: '', |
| - offscreen: '', |
| - pressed: '', |
| - protected: '', |
| - readOnly: '', |
| - required: '', |
| - richlyEditable: '', |
| - selectable: '', |
| - selected: '', |
| - vertical: '', |
| - visited: '', |
| + BUSY: 'busy', |
| + CHECKED: 'checked', |
| + COLLAPSED: 'collapsed', |
| + DEFAULT: 'default', |
| + DISABLED: 'disabled', |
| + EDITABLE: 'editable', |
| + EXPANDED: 'expanded', |
| + FOCUSABLE: 'focusable', |
| + FOCUSED: 'focused', |
| + HASPOPUP: 'haspopup', |
| + HORIZONTAL: 'horizontal', |
| + HOVERED: 'hovered', |
| + INVISIBLE: 'invisible', |
| + LINKED: 'linked', |
| + MULTILINE: 'multiline', |
| + MULTISELECTABLE: 'multiselectable', |
| + OFFSCREEN: 'offscreen', |
| + PRESSED: 'pressed', |
| + PROTECTED: 'protected', |
| + READ_ONLY: 'readOnly', |
| + REQUIRED: 'required', |
| + RICHLY_EDITABLE: 'richlyEditable', |
| + SELECTABLE: 'selectable', |
| + SELECTED: 'selected', |
| + VERTICAL: 'vertical', |
| + VISITED: 'visited', |
| }; |
| /** |
| - * @enum {number} |
| - */ |
| -chrome.automation.NameFromType = { |
|
David Tseng
2017/01/10 23:24:32
What happened to this enum? I don't see it below.
dmazzoni
2017/01/11 22:20:42
Done.
|
| - 0: '', |
| - 1: 'uninitialized', |
| - 2: 'attribute', |
| - 3: 'contents', |
| - 4: 'placeholder', |
| - 5: 'relatedElement', |
| - 6: 'value' |
| -}; |
| - |
| -/** |
| - * @enum {number} |
| + * @enum {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-TreeChangeType |
| */ |
| -chrome.automation.DescriptionFromType = { |
| - 0: '', |
| - 1: 'uninitialized', |
| - 2: 'attribute', |
| - 3: 'contents', |
| - 4: 'placeholder', |
| - 5: 'relatedElement' |
| +chrome.automation.TreeChangeType = { |
| + NODE_CREATED: 'nodeCreated', |
| + SUBTREE_CREATED: 'subtreeCreated', |
| + NODE_CHANGED: 'nodeChanged', |
| + TEXT_CHANGED: 'textChanged', |
| + NODE_REMOVED: 'nodeRemoved', |
| }; |
| /** |
| - * @enum {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-NameFromType |
| */ |
| -chrome.automation.TreeChangeType = { |
| - nodeCreated: 'nodeCreated', |
| - subtreeCreated: 'subtreeCreated', |
| - nodeChanged: 'nodeChanged', |
| - nodeRemoved: 'nodeRemoved', |
| -}; |
| +chrome.automation.NameFromType; |
| /** |
| * @typedef {{ |
| @@ -270,6 +264,7 @@ chrome.automation.TreeChangeType = { |
| * width: number, |
| * height: number |
| * }} |
| + * @see https://developer.chrome.com/extensions/automation#type-Rect |
| */ |
| chrome.automation.Rect; |
| @@ -279,419 +274,722 @@ chrome.automation.Rect; |
| * state: (Object|undefined), |
| * attributes: (Object|undefined) |
| * }} |
| + * @see https://developer.chrome.com/extensions/automation#type-FindParams |
| */ |
| chrome.automation.FindParams; |
| /** |
| + * @typedef {{ |
| + * anchorObject: Object, |
| + * anchorOffset: number, |
| + * focusObject: Object, |
| + * focusOffset: number |
| + * }} |
| + * @see https://developer.chrome.com/extensions/automation#type-SetDocumentSelectionParams |
| + */ |
| +chrome.automation.SetDocumentSelectionParams; |
| + |
| +/** |
| * @constructor |
|
David Tseng
2017/01/10 23:24:33
Did you try making this private?
dmazzoni
2017/01/11 22:20:42
Done, assuming that all classes generated by js_ex
|
| - * @param {chrome.automation.EventType} type |
| - * @param {chrome.automation.AutomationNode} node |
| - * @param {string} eventFrom |
| + * @see https://developer.chrome.com/extensions/automation#type-AutomationEvent |
| */ |
| -chrome.automation.AutomationEvent = function(type, node, eventFrom) {}; |
| +chrome.automation.AutomationEvent = function() {}; |
| /** |
| + * The $(ref:automation.AutomationNode) to which the event was targeted. |
| * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-target |
| */ |
| chrome.automation.AutomationEvent.prototype.target; |
| /** |
| + * The type of the event. |
| * @type {!chrome.automation.EventType} |
|
David Tseng
2017/01/10 23:24:33
Is this actually valid (i.e. !string is just strin
dmazzoni
2017/01/11 22:20:42
It's redundant but not illegal. The JSON schema co
|
| + * @see https://developer.chrome.com/extensions/automation#type-type |
| */ |
| chrome.automation.AutomationEvent.prototype.type; |
| /** |
| + * The source of this event. |
| * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-eventFrom |
| */ |
| chrome.automation.AutomationEvent.prototype.eventFrom; |
| /** |
| * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-mouseX |
| */ |
| chrome.automation.AutomationEvent.prototype.mouseX; |
| /** |
| * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-mouseY |
| */ |
| chrome.automation.AutomationEvent.prototype.mouseY; |
| +/** |
| + * Stops this event from further processing except for any remaining listeners |
| + * on $(ref:AutomationEvent.target). |
| + * @see https://developer.chrome.com/extensions/automation#method-stopPropagation |
| + */ |
| chrome.automation.AutomationEvent.prototype.stopPropagation = function() {}; |
| + |
| /** |
| * @typedef {{ |
| - * target: chrome.automation.AutomationNode, |
| + * target: !chrome.automation.AutomationNode, |
| * type: !chrome.automation.TreeChangeType |
| * }} |
| + * @see https://developer.chrome.com/extensions/automation#type-TreeChange |
| */ |
| chrome.automation.TreeChange; |
| /** |
| + * @enum {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-TreeChangeObserverFilter |
| + */ |
| +chrome.automation.TreeChangeObserverFilter = { |
| + NO_TREE_CHANGES: 'noTreeChanges', |
| + LIVE_REGION_TREE_CHANGES: 'liveRegionTreeChanges', |
| + TEXT_MARKER_CHANGES: 'textMarkerChanges', |
| + ALL_TREE_CHANGES: 'allTreeChanges', |
| +}; |
| + |
| +/** |
| * @constructor |
| + * @see https://developer.chrome.com/extensions/automation#type-AutomationNode |
| */ |
| chrome.automation.AutomationNode = function() {}; |
| - |
| /** |
| - * @param {number} tabId |
| - * @param {function(chrome.automation.AutomationNode):void} callback |
| + * The root node of the tree containing this AutomationNode. |
| + * @type {!chrome.automation.AutomationNode} |
|
David Tseng
2017/01/10 23:24:33
This is nullable.
dmazzoni
2017/01/11 22:20:42
Done.
|
| + * @see https://developer.chrome.com/extensions/automation#type-root |
| */ |
| -chrome.automation.getTree = function(tabId, callback) {}; |
| - |
| -/** @param {function(!chrome.automation.AutomationNode):void} callback */ |
| -chrome.automation.getDesktop = function(callback) {}; |
| +chrome.automation.AutomationNode.prototype.root; |
| -/** @param {function(!chrome.automation.AutomationNode):void} callback */ |
| -chrome.automation.getFocus = function(callback) {}; |
| +/** |
| + * Whether this AutomationNode is a root node. |
| + * @type {boolean} |
| + * @see https://developer.chrome.com/extensions/automation#type-isRootNode |
| + */ |
| +chrome.automation.AutomationNode.prototype.isRootNode; |
| /** |
| - * @param {string} filter |
| - * @param {function(chrome.automation.TreeChange) : void} |
| - * observer |
| + * The role of this node. |
| + * @type {!chrome.automation.RoleType} |
|
David Tseng
2017/01/10 23:24:32
Ditto.
dmazzoni
2017/01/11 22:20:42
Done.
|
| + * @see https://developer.chrome.com/extensions/automation#type-role |
| */ |
| -chrome.automation.addTreeChangeObserver = function(filter, observer) {}; |
| +chrome.automation.AutomationNode.prototype.role; |
| /** |
| - * @param {function(chrome.automation.TreeChange) : void} observer |
| + * The $(ref:automation.StateType)s describing this node. |
| + * @see https://developer.chrome.com/extensions/automation#type-state |
| */ |
| -chrome.automation.removeTreeChangeObserver = function(observer) {}; |
| +chrome.automation.AutomationNode.prototype.state; |
|
David Tseng
2017/01/10 23:24:32
This had a decent annotation before
Object<chrome.
dmazzoni
2017/01/11 22:20:42
I spent several hours trying to do this in a clean
|
| -// |
| -// End auto generated externs; do not edit. |
| -// |
| +/** |
| + * The rendered location (as a bounding box) of this node in global screen coordinates. |
| + * @type {!chrome.automation.Rect} |
| + * @see https://developer.chrome.com/extensions/automation#type-location |
| + */ |
| +chrome.automation.AutomationNode.prototype.location; |
| +/** |
| + * Computes the bounding box of a subrange of this node in global screen |
| + * coordinates. Returns the same as |location| if range information is not |
| + * available. The start and end indices are zero-based offsets into the node's |
| + * "name" string attribute. |
| + * @param {number} startIndex |
| + * @param {number} endIndex |
| + * @return {!chrome.automation.Rect} |
| + * @see https://developer.chrome.com/extensions/automation#method-boundsForRange |
| + */ |
| +chrome.automation.AutomationNode.prototype.boundsForRange = function(startIndex, endIndex) {}; |
| +/** |
| + * The purpose of the node, other than the role, if any. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-description |
| + */ |
| +chrome.automation.AutomationNode.prototype.description; |
| /** |
| - * @type {chrome.automation.RoleType} |
| + * The help text for the node, if any. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-help |
| */ |
| -chrome.automation.AutomationNode.prototype.role; |
| +chrome.automation.AutomationNode.prototype.help; |
| +/** |
| + * The accessible name for this node, via the <a href="http://www.w3.org/TR/wai-aria/roles#namecalculation"> Accessible Name Calculation</a> process. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-name |
| + */ |
| +chrome.automation.AutomationNode.prototype.name; |
| /** |
| - * @type {!Object<chrome.automation.StateType, boolean>} |
| + * The source of the name. Use NameFromType to convert this to a string. |
| + * @type {number} |
|
David Tseng
2017/01/10 23:24:33
Let's just make this a string and do the conversio
dmazzoni
2017/01/11 22:20:42
Done.
|
| + * @see https://developer.chrome.com/extensions/automation#type-nameFrom |
| */ |
| -chrome.automation.AutomationNode.prototype.state; |
| +chrome.automation.AutomationNode.prototype.nameFrom; |
| +/** |
| + * The value for this node: for example the <code>value</code> attribute of an <code><input> element. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-value |
| + */ |
| +chrome.automation.AutomationNode.prototype.value; |
| /** |
| - * @type {chrome.automation.NameFromType} |
| + * The HTML tag for this element, if this node is an HTML element. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-htmlTag |
| */ |
| -chrome.automation.AutomationNode.prototype.nameFrom; |
| +chrome.automation.AutomationNode.prototype.htmlTag; |
| +/** |
| + * The level of a heading or tree item. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-hierarchicalLevel |
| + */ |
| +chrome.automation.AutomationNode.prototype.hierarchicalLevel; |
| /** |
| - * @type {chrome.automation.DescriptionFromType} |
| + * The start and end index of each word in an inline text box. |
| + * @type {!Array<number>} |
|
David Tseng
2017/01/10 23:24:32
Nullable. Please make a ful pass between these aut
dmazzoni
2017/01/11 22:20:42
Done.
|
| + * @see https://developer.chrome.com/extensions/automation#type-wordStarts |
| */ |
| -chrome.automation.AutomationNode.prototype.descriptionFrom; |
| +chrome.automation.AutomationNode.prototype.wordStarts; |
| +/** |
| + * @type {!Array<number>} |
| + * @see https://developer.chrome.com/extensions/automation#type-wordEnds |
| + */ |
| +chrome.automation.AutomationNode.prototype.wordEnds; |
| /** |
| - * @type {number} |
| + * The nodes, if any, which this node is specified to control via <a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-controls"> <code>aria-controls</code></a>. |
| + * @type {!Array<!chrome.automation.AutomationNode>} |
| + * @see https://developer.chrome.com/extensions/automation#type-controls |
| */ |
| -chrome.automation.AutomationNode.prototype.indexInParent; |
| +chrome.automation.AutomationNode.prototype.controls; |
| +/** |
| + * The nodes, if any, which form a description for this node. |
| + * @type {!Array<!chrome.automation.AutomationNode>} |
| + * @see https://developer.chrome.com/extensions/automation#type-describedBy |
| + */ |
| +chrome.automation.AutomationNode.prototype.describedBy; |
| /** |
| - * @type {string} |
| + * The nodes, if any, which may optionally be navigated to after this one. See <a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-flowto"> <code>aria-flowto</code></a>. |
| + * @type {!Array<!chrome.automation.AutomationNode>} |
| + * @see https://developer.chrome.com/extensions/automation#type-flowTo |
| */ |
| -chrome.automation.AutomationNode.prototype.name; |
| +chrome.automation.AutomationNode.prototype.flowTo; |
| /** |
| - * @type {string} |
| + * The nodes, if any, which form a label for this element. Generally, the text from these elements will also be exposed as the element's accessible name, via the $(ref:automation.AutomationNode.name) attribute. |
| + * @type {!Array<!chrome.automation.AutomationNode>} |
| + * @see https://developer.chrome.com/extensions/automation#type-labelledBy |
| */ |
| -chrome.automation.AutomationNode.prototype.description; |
| +chrome.automation.AutomationNode.prototype.labelledBy; |
| +/** |
| + * The node referred to by <code>aria-activedescendant</code>, where applicable |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-activeDescendant |
| + */ |
| +chrome.automation.AutomationNode.prototype.activeDescendant; |
|
David Tseng
2017/01/10 23:24:33
Most, if not all of these, are nullable.
dmazzoni
2017/01/11 22:20:42
Done.
|
| /** |
| + * The URL that this link will navigate to. |
| * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-url |
| */ |
| chrome.automation.AutomationNode.prototype.url; |
| - |
| /** |
| + * The URL of this document. |
| * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-docUrl |
| */ |
| chrome.automation.AutomationNode.prototype.docUrl; |
| - |
| /** |
| + * The title of this document. |
| * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-docTitle |
| */ |
| -chrome.automation.AutomationNode.prototype.value; |
| +chrome.automation.AutomationNode.prototype.docTitle; |
| +/** |
| + * Whether this document has finished loading. |
| + * @type {boolean} |
| + * @see https://developer.chrome.com/extensions/automation#type-docLoaded |
| + */ |
| +chrome.automation.AutomationNode.prototype.docLoaded; |
| /** |
| + * The proportion (out of 1.0) that this doc has completed loading. |
| * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-docLoadingProgress |
| */ |
| -chrome.automation.AutomationNode.prototype.textSelStart; |
| - |
| +chrome.automation.AutomationNode.prototype.docLoadingProgress; |
| /** |
| + * Scrollable container attributes. |
| * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-scrollX |
| */ |
| -chrome.automation.AutomationNode.prototype.textSelEnd; |
| - |
| +chrome.automation.AutomationNode.prototype.scrollX; |
| /** |
| - * @type {Array<number>} |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-scrollXMin |
| */ |
| -chrome.automation.AutomationNode.prototype.wordStarts; |
| - |
| +chrome.automation.AutomationNode.prototype.scrollXMin; |
| /** |
| - * @type {Array<number>} |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-scrollXMax |
| */ |
| -chrome.automation.AutomationNode.prototype.wordEnds; |
| - |
| +chrome.automation.AutomationNode.prototype.scrollXMax; |
| /** |
| - * @type {chrome.automation.AutomationRootNode} |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-scrollY |
| */ |
| -chrome.automation.AutomationNode.prototype.root; |
| - |
| +chrome.automation.AutomationNode.prototype.scrollY; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-scrollYMin |
| */ |
| -chrome.automation.AutomationNode.prototype.firstChild; |
| - |
| +chrome.automation.AutomationNode.prototype.scrollYMin; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-scrollYMax |
| */ |
| -chrome.automation.AutomationNode.prototype.lastChild; |
| - |
| +chrome.automation.AutomationNode.prototype.scrollYMax; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * The character index of the start of the selection within this editable text element; -1 if no selection. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-textSelStart |
| */ |
| -chrome.automation.AutomationNode.prototype.nextSibling; |
| - |
| +chrome.automation.AutomationNode.prototype.textSelStart; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * The character index of the end of the selection within this editable text element; -1 if no selection. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-textSelEnd |
| */ |
| -chrome.automation.AutomationNode.prototype.previousSibling; |
| - |
| +chrome.automation.AutomationNode.prototype.textSelEnd; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * The input type, like email or number. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-textInputType |
| */ |
| -chrome.automation.AutomationNode.prototype.parent; |
| - |
| +chrome.automation.AutomationNode.prototype.textInputType; |
| /** |
| - * @type {!Array<chrome.automation.AutomationNode>} |
| + * An array of indexes of the start position of each text marker. |
|
David Tseng
2017/01/10 23:24:33
This property has no annotation?
dmazzoni
2017/01/11 22:20:42
Done.
|
| + * @see https://developer.chrome.com/extensions/automation#type-markerStarts |
| */ |
| -chrome.automation.AutomationNode.prototype.children; |
| - |
| +chrome.automation.AutomationNode.prototype.markerStarts; |
| /** |
| - * @type {{top: number, left: number, height: number, width: number}|undefined} |
| + * An array of indexes of the end position of each text marker. |
| + * @see https://developer.chrome.com/extensions/automation#type-markerEnds |
| */ |
|
David Tseng
2017/01/10 23:24:33
Ditto.
dmazzoni
2017/01/11 22:20:42
This one is good, the new type is {chrome.automati
|
| -chrome.automation.AutomationNode.prototype.location; |
| - |
| +chrome.automation.AutomationNode.prototype.markerEnds; |
| /** |
| - * @param {number} start |
| - * @param {number} end |
| - * @return { |
| - * ({top: number, left: number, height: number, width: number})|undefined} |
| + * An array of numerical types indicating the type of each text marker, such as a spelling error. |
| + * @see https://developer.chrome.com/extensions/automation#type-markerTypes |
| */ |
|
David Tseng
2017/01/10 23:24:32
Ditto.
dmazzoni
2017/01/11 22:20:42
Same
|
| -chrome.automation.AutomationNode.prototype.boundsForRange = |
| - function(start, end) {}; |
| - |
| - |
| -chrome.automation.AutomationNode.prototype.makeVisible = function() {}; |
| - |
| +chrome.automation.AutomationNode.prototype.markerTypes; |
| /** |
| - * @param {chrome.automation.EventType} eventType |
| - * @param {function(!chrome.automation.AutomationEvent) : void} callback |
| - * @param {boolean} capture |
| + * The anchor node of the tree selection, if any. |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-anchorObject |
| */ |
| -chrome.automation.AutomationNode.prototype.addEventListener = |
| - function(eventType, callback, capture) {}; |
| +chrome.automation.AutomationNode.prototype.anchorObject; |
|
David Tseng
2017/01/10 23:24:33
This can only ever be present on an AutomationRoot
dmazzoni
2017/01/11 22:20:42
Done.
|
| +/** |
| + * The anchor offset of the tree selection, if any. |
| + * @type {number} |
|
David Tseng
2017/01/10 23:24:32
?number
dmazzoni
2017/01/11 22:20:42
Done.
|
| + * @see https://developer.chrome.com/extensions/automation#type-anchorOffset |
| + */ |
| +chrome.automation.AutomationNode.prototype.anchorOffset; |
| /** |
| - * @param {chrome.automation.EventType} eventType |
| - * @param {function(!chrome.automation.AutomationEvent) : void} callback |
| - * @param {boolean} capture |
| + * The focus node of the tree selection, if any. |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-focusObject |
| */ |
| -chrome.automation.AutomationNode.prototype.removeEventListener = |
| - function(eventType, callback, capture) {}; |
| +chrome.automation.AutomationNode.prototype.focusObject; |
| +/** |
| + * The focus offset of the tree selection, if any. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-focusOffset |
| + */ |
| +chrome.automation.AutomationNode.prototype.focusOffset; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * The current value for this range. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-valueForRange |
| */ |
| -chrome.automation.TreeChange.prototype.target; |
| +chrome.automation.AutomationNode.prototype.valueForRange; |
| +/** |
| + * The minimum possible value for this range. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-minValueForRange |
| + */ |
| +chrome.automation.AutomationNode.prototype.minValueForRange; |
| /** |
| - * @type {chrome.automation.TreeChangeType} |
| + * The maximum possible value for this range. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-maxValueForRange |
| */ |
| -chrome.automation.TreeChange.prototype.type; |
| +chrome.automation.AutomationNode.prototype.maxValueForRange; |
| +/** |
| + * The number of rows in this table. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-tableRowCount |
| + */ |
| +chrome.automation.AutomationNode.prototype.tableRowCount; |
| -chrome.automation.AutomationNode.prototype.doDefault = function() {}; |
| +/** |
| + * The number of columns in this table. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-tableColumnCount |
| + */ |
| +chrome.automation.AutomationNode.prototype.tableColumnCount; |
| +/** |
| + * The zero-based index of the column that this cell is in. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-tableCellColumnIndex |
| + */ |
| +chrome.automation.AutomationNode.prototype.tableCellColumnIndex; |
| -chrome.automation.AutomationNode.prototype.focus = function() {}; |
| +/** |
| + * The number of columns that this cell spans (default is 1). |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-tableCellColumnSpan |
| + */ |
| +chrome.automation.AutomationNode.prototype.tableCellColumnSpan; |
| +/** |
| + * The zero-based index of the row that this cell is in. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-tableCellRowIndex |
| + */ |
| +chrome.automation.AutomationNode.prototype.tableCellRowIndex; |
| -chrome.automation.AutomationNode.prototype.showContextMenu = function() {}; |
| +/** |
| + * The number of rows that this cell spans (default is 1). |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-tableCellRowSpan |
| + */ |
| +chrome.automation.AutomationNode.prototype.tableCellRowSpan; |
| +/** |
| + * The type of region if this is the root of a live region. Possible values are 'polite' and 'assertive'. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-liveStatus |
| + */ |
| +chrome.automation.AutomationNode.prototype.liveStatus; |
|
David Tseng
2017/01/10 23:24:33
All of the above are nullable.
dmazzoni
2017/01/11 22:20:42
Done.
|
| -chrome.automation.AutomationNode.prototype |
| - .setSequentialFocusNavigationStartingPoint = function() {}; |
| +/** |
| + * The value of aria-relevant for a live region. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-liveRelevant |
| + */ |
| +chrome.automation.AutomationNode.prototype.liveRelevant; |
| +/** |
| + * The value of aria-atomic for a live region. |
| + * @type {boolean} |
| + * @see https://developer.chrome.com/extensions/automation#type-liveAtomic |
| + */ |
| +chrome.automation.AutomationNode.prototype.liveAtomic; |
| /** |
| - * @param {number} start |
| - * @param {number} end |
| + * The value of aria-busy for a live region. |
| + * @type {boolean} |
| + * @see https://developer.chrome.com/extensions/automation#type-liveBusy |
| */ |
| -chrome.automation.AutomationNode.prototype.setSelection = |
| - function(start, end) {}; |
| +chrome.automation.AutomationNode.prototype.liveBusy; |
| -/** @type {string} */ |
| +/** |
| + * The type of live region if this node is inside a live region. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-containerLiveStatus |
| + */ |
| chrome.automation.AutomationNode.prototype.containerLiveStatus; |
| -/** @type {string} */ |
| +/** |
| + * The value of aria-relevant if this node is inside a live region. |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-containerLiveRelevant |
| + */ |
| chrome.automation.AutomationNode.prototype.containerLiveRelevant; |
| -/** @type {boolean} */ |
| +/** |
| + * The value of aria-atomic if this node is inside a live region. |
| + * @type {boolean} |
| + * @see https://developer.chrome.com/extensions/automation#type-containerLiveAtomic |
| + */ |
| chrome.automation.AutomationNode.prototype.containerLiveAtomic; |
| -/** @type {boolean} */ |
| +/** |
| + * The value of aria-busy if this node is inside a live region. |
| + * @type {boolean} |
| + * @see https://developer.chrome.com/extensions/automation#type-containerLiveBusy |
| + */ |
| chrome.automation.AutomationNode.prototype.containerLiveBusy; |
|
David Tseng
2017/01/10 23:24:33
Nullable for these live region attributes as well.
dmazzoni
2017/01/11 22:20:42
Done.
|
| -/** @type {string} */ |
| -chrome.automation.AutomationNode.prototype.language; |
| - |
| -/** @type {string} */ |
| -chrome.automation.AutomationNode.prototype.liveStatus; |
| - |
| -/** @type {string} */ |
| -chrome.automation.AutomationNode.prototype.liveRelevant; |
| +/** |
| + * A map containing all HTML attributes and their values |
| + * @see https://developer.chrome.com/extensions/automation#type-htmlAttributes |
|
David Tseng
2017/01/10 23:24:33
No annotation. Should be Object<string, string>
dmazzoni
2017/01/11 22:20:42
Done.
Dan Beam
2017/01/11 23:04:26
also note, Object<string> is pretty much exactly t
|
| + */ |
| +chrome.automation.AutomationNode.prototype.htmlAttributes; |
| -/** @type {boolean} */ |
| -chrome.automation.AutomationNode.prototype.liveAtomic; |
| +/** |
| + * The input type of a text field, such as "text" or "email". |
| + * @type {string} |
| + * @see https://developer.chrome.com/extensions/automation#type-inputType |
| + */ |
| +chrome.automation.AutomationNode.prototype.inputType; |
| -/** @type {boolean} */ |
| -chrome.automation.AutomationNode.prototype.liveBusy; |
| +/** |
| + * Walking the tree. |
| + * @type {!Array<!chrome.automation.AutomationNode>} |
| + * @see https://developer.chrome.com/extensions/automation#type-children |
| + */ |
| +chrome.automation.AutomationNode.prototype.children; |
| +/** |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-parent |
| + */ |
| +chrome.automation.AutomationNode.prototype.parent; |
| /** |
| - * @param {Object} findParams |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-firstChild |
| */ |
| -chrome.automation.AutomationNode.prototype.find = function(findParams) {}; |
| +chrome.automation.AutomationNode.prototype.firstChild; |
| /** |
| - * @param {Object} findParams |
| - * @return {Array<chrome.automation.AutomationNode>} |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-lastChild |
| */ |
| -chrome.automation.AutomationNode.prototype.findAll = function(findParams) {}; |
| +chrome.automation.AutomationNode.prototype.lastChild; |
| /** |
| - * @type {string} |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-previousSibling |
| */ |
| -chrome.automation.AutomationNode.prototype.inputType; |
| +chrome.automation.AutomationNode.prototype.previousSibling; |
| /** |
| - * @type {(chrome.automation.AutomationNode|undefined)} |
| + * @type {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#type-nextSibling |
| */ |
| -chrome.automation.AutomationNode.prototype.anchorObject; |
| +chrome.automation.AutomationNode.prototype.nextSibling; |
| /** |
| - * @param {{anchorObject: !chrome.automation.AutomationNode, |
| - * anchorOffset: number, |
| - * focusObject: !chrome.automation.AutomationNode, |
| - * focusOffset: number}} selectionParams |
| + * The index of this node in its parent node's list of children. If this is the root node, this will be undefined. |
| + * @type {number} |
| + * @see https://developer.chrome.com/extensions/automation#type-indexInParent |
| */ |
| -chrome.automation.setDocumentSelection = function(selectionParams) {}; |
| +chrome.automation.AutomationNode.prototype.indexInParent; |
| /** |
| - * @type {(number|undefined)} |
| + * Does the default action based on this node's role. This is generally the same |
| + * action that would result from clicking the node such as expanding a treeitem, |
| + * toggling a checkbox, selecting a radiobutton, or activating a button. |
| + * @see https://developer.chrome.com/extensions/automation#method-doDefault |
| */ |
| -chrome.automation.anchorOffset; |
| +chrome.automation.AutomationNode.prototype.doDefault = function() {}; |
| /** |
| - * @type {(chrome.automation.AutomationNode|undefined)} |
| + * Places focus on this node. |
| + * @see https://developer.chrome.com/extensions/automation#method-focus |
| */ |
| -chrome.automation.AutomationNode.prototype.focusObject; |
| +chrome.automation.AutomationNode.prototype.focus = function() {}; |
| /** |
| - * @type {(Array<number>|undefined)} |
| + * Request a data url for the contents of an image, optionally resized. Pass |
| + * zero for maxWidth and/or maxHeight for the original size. |
| + * @param {number} maxWidth |
| + * @param {number} maxHeight |
| + * @see https://developer.chrome.com/extensions/automation#method-getImageData |
| */ |
| -chrome.automation.AutomationNode.prototype.lineBreaks; |
| +chrome.automation.AutomationNode.prototype.getImageData = function(maxWidth, maxHeight) {}; |
| /** |
| - * @type {(number|undefined)} |
| + * Scrolls this node to make it visible. |
| + * @see https://developer.chrome.com/extensions/automation#method-makeVisible |
| */ |
| -chrome.automation.focusOffset; |
| +chrome.automation.AutomationNode.prototype.makeVisible = function() {}; |
| /** |
| - * @type {(chrome.automation.AutomationNode|undefined)} |
| + * Sets selection within a text field. |
| + * @param {number} startIndex |
| + * @param {number} endIndex |
| + * @see https://developer.chrome.com/extensions/automation#method-setSelection |
| */ |
| -chrome.automation.AutomationNode.prototype.activeDescendant; |
| +chrome.automation.AutomationNode.prototype.setSelection = function(startIndex, endIndex) {}; |
| -/** @type {number} */ |
| -chrome.automation.AutomationNode.prototype.tableCellColumnIndex; |
| +/** |
| + * Clears focus and sets this node as the starting point for the next time the |
| + * user presses Tab or Shift+Tab. |
| + * @see https://developer.chrome.com/extensions/automation#method-setSequentialFocusNavigationStartingPoint |
| + */ |
| +chrome.automation.AutomationNode.prototype.setSequentialFocusNavigationStartingPoint = function() {}; |
| -/** @type {number} */ |
| -chrome.automation.AutomationNode.prototype.tableCellRowIndex; |
| +/** |
| + * Adds a listener for the given event type and event phase. |
| + * @param {!chrome.automation.EventType} eventType |
| + * @param {function(!chrome.automation.AutomationEvent):void} listener A |
| + * listener for events on an <code>AutomationNode</code>. |
| + * @param {boolean} capture |
| + * @see https://developer.chrome.com/extensions/automation#method-addEventListener |
| + */ |
| +chrome.automation.AutomationNode.prototype.addEventListener = function(eventType, listener, capture) {}; |
| -/** @type {number} */ |
| -chrome.automation.AutomationNode.prototype.tableColumnCount; |
| +/** |
| + * Removes a listener for the given event type and event phase. |
| + * @param {!chrome.automation.EventType} eventType |
| + * @param {function(!chrome.automation.AutomationEvent):void} listener A |
| + * listener for events on an <code>AutomationNode</code>. |
| + * @param {boolean} capture |
| + * @see https://developer.chrome.com/extensions/automation#method-removeEventListener |
| + */ |
| +chrome.automation.AutomationNode.prototype.removeEventListener = function(eventType, listener, capture) {}; |
| -/** @type {number} */ |
| -chrome.automation.AutomationNode.prototype.tableRowCount; |
| +/** |
| + * <p>Gets the first node in this node's subtree which matches the given CSS |
| + * selector and is within the same DOM context.</p><p>If this node doesn't |
| + * correspond directly with an HTML node in the DOM, querySelector will be run |
| + * on this node's nearest HTML node ancestor. Note that this may result in the |
| + * query returning a node which is not a descendant of this node.</p><p>If the |
| + * selector matches a node which doesn't directly correspond to an automation |
| + * node (for example an element within an ARIA widget, where the ARIA widget |
| + * forms one node of the automation tree, or an element which is hidden from |
| + * accessibility via hiding it using CSS or using aria-hidden), this will return |
| + * the nearest ancestor which does correspond to an automation node.</p> |
| + * @param {string} selector |
| + * @param {function(!chrome.automation.AutomationNode):void} callback Called |
| + * when the result for a <code>query</code> is available. |
| + * @see https://developer.chrome.com/extensions/automation#method-domQuerySelector |
| + */ |
| +chrome.automation.AutomationNode.prototype.domQuerySelector = function(selector, callback) {}; |
| -/** @type {number} */ |
| -chrome.automation.AutomationNode.prototype.hierarchicalLevel; |
| +/** |
| + * Finds the first AutomationNode in this node's subtree which matches the given |
| + * search parameters. |
| + * @param {!chrome.automation.FindParams} params |
| + * @return {!chrome.automation.AutomationNode} |
| + * @see https://developer.chrome.com/extensions/automation#method-find |
| + */ |
| +chrome.automation.AutomationNode.prototype.find = function(params) {}; |
| -/** @type {Array<number>} */ |
| -chrome.automation.AutomationNode.prototype.markerTypes; |
| -/** @type {Array<number>} */ |
| -chrome.automation.AutomationNode.prototype.markerStarts; |
| -/** @type {Array<number>} */ |
| -chrome.automation.AutomationNode.prototype.markerEnds; |
| +/** |
| + * Finds all the AutomationNodes in this node's subtree which matches the given |
| + * search parameters. |
| + * @param {!chrome.automation.FindParams} params |
| + * @return {!Array<!chrome.automation.AutomationNode>} |
| + * @see https://developer.chrome.com/extensions/automation#method-findAll |
| + */ |
| +chrome.automation.AutomationNode.prototype.findAll = function(params) {}; |
| -/** @type {boolean} */ |
| -chrome.automation.AutomationNode.prototype.ariaReadonly; |
| +/** |
| + * Returns whether this node matches the given $(ref:automation.FindParams). |
| + * @param {!chrome.automation.FindParams} params |
| + * @return {boolean} |
| + * @see https://developer.chrome.com/extensions/automation#method-matches |
| + */ |
| +chrome.automation.AutomationNode.prototype.matches = function(params) {}; |
| -/** @type {chrome.automation.AutomationNode} */ |
| -chrome.automation.AutomationNode.prototype.nextOnLine; |
| -/** @type {chrome.automation.AutomationNode} */ |
| -chrome.automation.AutomationNode.prototype.previousOnLine; |
| -/** @type {Object<string, string>} */ |
| -chrome.automation.AutomationNode.prototype.htmlAttributes; |
| +/** |
| + * Get the automation tree for the tab with the given tabId, or the current tab |
| + * if no tabID is given, enabling automation if necessary. Returns a tree with a |
| + * placeholder root node; listen for the "loadComplete" event to get a |
| + * notification that the tree has fully loaded (the previous root node reference |
| + * will stop working at or before this point). |
| + * @param {number} tabId |
| + * @param {function(!chrome.automation.AutomationNode):void} callback Called |
| + * when the <code>AutomationNode</code> for the page is available. |
| + * @see https://developer.chrome.com/extensions/automation#method-getTree |
| + */ |
| +chrome.automation.getTree = function(tabId, callback) {}; |
| /** |
| - * @extends {chrome.automation.AutomationNode} |
| - * @constructor |
| + * Get the automation tree for the whole desktop which consists of all on screen |
| + * views. Note this API is currently only supported on Chrome OS. |
| + * @param {function(!chrome.automation.AutomationNode):void} callback Called |
| + * when the <code>AutomationNode</code> for the page is available. |
| + * @see https://developer.chrome.com/extensions/automation#method-getDesktop |
| */ |
| -chrome.automation.AutomationRootNode = function() {}; |
| +chrome.automation.getDesktop = function(callback) {}; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * Get the automation node that currently has focus, globally. Will return null |
| + * if none of the nodes in any loaded trees have focus. |
| + * @param {function(!chrome.automation.AutomationNode):void} callback Called |
| + * with the <code>AutomationNode</code> that currently has focus. |
| + * @see https://developer.chrome.com/extensions/automation#method-getFocus |
| */ |
| -chrome.automation.AutomationRootNode.prototype.anchorObject; |
| +chrome.automation.getFocus = function(callback) {}; |
| /** |
| - * @type {number} |
| + * Add a tree change observer. Tree change observers are static/global, they |
| + * listen to changes across all trees. Pass a filter to determine what specific |
| + * tree changes to listen to, and note that listnening to all tree changes can |
| + * be expensive. |
| + * @param {!chrome.automation.TreeChangeObserverFilter} filter |
| + * @param {function(!chrome.automation.TreeChange):void} observer A listener for |
| + * changes on the <code>AutomationNode</code> tree. |
| + * @see https://developer.chrome.com/extensions/automation#method-addTreeChangeObserver |
| */ |
| -chrome.automation.AutomationRootNode.prototype.anchorOffset; |
| +chrome.automation.addTreeChangeObserver = function(filter, observer) {}; |
| /** |
| - * @type {chrome.automation.AutomationNode} |
| + * Remove a tree change observer. |
| + * @param {function(!chrome.automation.TreeChange):void} observer A listener for |
| + * changes on the <code>AutomationNode</code> tree. |
| + * @see https://developer.chrome.com/extensions/automation#method-removeTreeChangeObserver |
| */ |
| -chrome.automation.AutomationRootNode.prototype.focusObject; |
| +chrome.automation.removeTreeChangeObserver = function(observer) {}; |
| /** |
| - * @type {number} |
| + * Sets the selection in a tree. This creates a selection in a single tree |
| + * (anchorObject and focusObject must have the same root). Everything in the |
| + * tree between the two node/offset pairs gets included in the selection. The |
| + * anchor is where the user started the selection, while the focus is the point |
| + * at which the selection gets extended e.g. when dragging with a mouse or using |
| + * the keyboard. For nodes with the role staticText, the offset gives the |
| + * character offset within the value where the selection starts or ends, |
| + * respectively. |
| + * @param {!chrome.automation.SetDocumentSelectionParams} params |
| + * @see https://developer.chrome.com/extensions/automation#method-setDocumentSelection |
| */ |
| -chrome.automation.AutomationRootNode.prototype.focusOffset; |
| +chrome.automation.setDocumentSelection = function(params) {}; |