| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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 var AutomationEvent = require('automationEvent').AutomationEvent; | 5 var AutomationEvent = require('automationEvent').AutomationEvent; |
| 6 var automationInternal = | 6 var automationInternal = |
| 7 require('binding').Binding.create('automationInternal').generate(); | 7 require('binding').Binding.create('automationInternal').generate(); |
| 8 var exceptionHandler = require('uncaught_exception_handler'); | 8 var exceptionHandler = require('uncaught_exception_handler'); |
| 9 var IsInteractPermitted = | 9 var IsInteractPermitted = |
| 10 requireNative('automationInternal').IsInteractPermitted; | 10 requireNative('automationInternal').IsInteractPermitted; |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 * @param {number} axTreeID The id of the accessibility tree. | 128 * @param {number} axTreeID The id of the accessibility tree. |
| 129 * @param {number} nodeID The id of a node. | 129 * @param {number} nodeID The id of a node. |
| 130 * @return {?Object} An object with a string key for every state flag set, | 130 * @return {?Object} An object with a string key for every state flag set, |
| 131 * or undefined if the tree or node or node parent wasn't found. | 131 * or undefined if the tree or node or node parent wasn't found. |
| 132 */ | 132 */ |
| 133 var GetState = requireNative('automationInternal').GetState; | 133 var GetState = requireNative('automationInternal').GetState; |
| 134 | 134 |
| 135 /** | 135 /** |
| 136 * @param {number} axTreeID The id of the accessibility tree. | 136 * @param {number} axTreeID The id of the accessibility tree. |
| 137 * @param {number} nodeID The id of a node. | 137 * @param {number} nodeID The id of a node. |
| 138 * @return {string} The checked state, as undefined, "true", "false" or "mixed". |
| 139 */ |
| 140 var GetChecked = requireNative('automationInternal').GetChecked; |
| 141 |
| 142 /** |
| 143 * @param {number} axTreeID The id of the accessibility tree. |
| 144 * @param {number} nodeID The id of a node. |
| 138 * @return {string} The role of the node, or undefined if the tree or | 145 * @return {string} The role of the node, or undefined if the tree or |
| 139 * node wasn't found. | 146 * node wasn't found. |
| 140 */ | 147 */ |
| 141 var GetRole = requireNative('automationInternal').GetRole; | 148 var GetRole = requireNative('automationInternal').GetRole; |
| 142 | 149 |
| 143 /** | 150 /** |
| 144 * @param {number} axTreeID The id of the accessibility tree. | 151 * @param {number} axTreeID The id of the accessibility tree. |
| 145 * @param {number} nodeID The id of a node. | 152 * @param {number} nodeID The id of a node. |
| 146 * @return {?automation.Rect} The location of the node, or undefined if | 153 * @return {?automation.Rect} The location of the node, or undefined if |
| 147 * the tree or node wasn't found. | 154 * the tree or node wasn't found. |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 276 }, | 283 }, |
| 277 | 284 |
| 278 get state() { | 285 get state() { |
| 279 return GetState(this.treeID, this.id) || {}; | 286 return GetState(this.treeID, this.id) || {}; |
| 280 }, | 287 }, |
| 281 | 288 |
| 282 get role() { | 289 get role() { |
| 283 return GetRole(this.treeID, this.id); | 290 return GetRole(this.treeID, this.id); |
| 284 }, | 291 }, |
| 285 | 292 |
| 293 get checked() { |
| 294 return GetChecked(this.treeID, this.id); |
| 295 }, |
| 296 |
| 286 get location() { | 297 get location() { |
| 287 return GetLocation(this.treeID, this.id); | 298 return GetLocation(this.treeID, this.id); |
| 288 }, | 299 }, |
| 289 | 300 |
| 290 boundsForRange: function(startIndex, endIndex) { | 301 boundsForRange: function(startIndex, endIndex) { |
| 291 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex); | 302 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex); |
| 292 }, | 303 }, |
| 293 | 304 |
| 294 get indexInParent() { | 305 get indexInParent() { |
| 295 return GetIndexInParent(this.treeID, this.id); | 306 return GetIndexInParent(this.treeID, this.id); |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 'liveRelevant', | 709 'liveRelevant', |
| 699 'liveStatus', | 710 'liveStatus', |
| 700 'name', | 711 'name', |
| 701 'placeholder', | 712 'placeholder', |
| 702 'textInputType', | 713 'textInputType', |
| 703 'url', | 714 'url', |
| 704 'value']; | 715 'value']; |
| 705 | 716 |
| 706 var boolAttributes = [ | 717 var boolAttributes = [ |
| 707 'ariaReadonly', | 718 'ariaReadonly', |
| 708 'buttonMixed', | |
| 709 'containerLiveAtomic', | 719 'containerLiveAtomic', |
| 710 'containerLiveBusy', | 720 'containerLiveBusy', |
| 711 'liveAtomic', | 721 'liveAtomic', |
| 712 'liveBusy']; | 722 'liveBusy']; |
| 713 | 723 |
| 714 var intAttributes = [ | 724 var intAttributes = [ |
| 715 'backgroundColor', | 725 'backgroundColor', |
| 716 'color', | 726 'color', |
| 717 'colorValue', | 727 'colorValue', |
| 718 'hierarchicalLevel', | 728 'hierarchicalLevel', |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1106 ], | 1116 ], |
| 1107 readonly: $Array.concat(publicAttributes, [ | 1117 readonly: $Array.concat(publicAttributes, [ |
| 1108 'parent', | 1118 'parent', |
| 1109 'firstChild', | 1119 'firstChild', |
| 1110 'lastChild', | 1120 'lastChild', |
| 1111 'children', | 1121 'children', |
| 1112 'previousSibling', | 1122 'previousSibling', |
| 1113 'nextSibling', | 1123 'nextSibling', |
| 1114 'isRootNode', | 1124 'isRootNode', |
| 1115 'role', | 1125 'role', |
| 1126 'checked', |
| 1116 'state', | 1127 'state', |
| 1117 'location', | 1128 'location', |
| 1118 'indexInParent', | 1129 'indexInParent', |
| 1119 'lineStartOffsets', | 1130 'lineStartOffsets', |
| 1120 'root', | 1131 'root', |
| 1121 'htmlAttributes', | 1132 'htmlAttributes', |
| 1122 'nameFrom', | 1133 'nameFrom', |
| 1123 ]), | 1134 ]), |
| 1124 }); | 1135 }); |
| 1125 | 1136 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1150 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { | 1161 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { |
| 1151 return AutomationRootNodeImpl.getOrCreate(treeID); | 1162 return AutomationRootNodeImpl.getOrCreate(treeID); |
| 1152 }); | 1163 }); |
| 1153 | 1164 |
| 1154 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { | 1165 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { |
| 1155 AutomationRootNodeImpl.destroy(treeID); | 1166 AutomationRootNodeImpl.destroy(treeID); |
| 1156 }); | 1167 }); |
| 1157 | 1168 |
| 1158 exports.$set('AutomationNode', AutomationNode); | 1169 exports.$set('AutomationNode', AutomationNode); |
| 1159 exports.$set('AutomationRootNode', AutomationRootNode); | 1170 exports.$set('AutomationRootNode', AutomationRootNode); |
| OLD | NEW |