| 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 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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". | 138 * @return {string} The checked state, as undefined, "true", "false" or "mixed". |
| 139 */ | 139 */ |
| 140 var GetChecked = requireNative('automationInternal').GetChecked; | 140 var GetChecked = requireNative('automationInternal').GetChecked; |
| 141 | 141 |
| 142 /** | 142 /** |
| 143 * @param {number} axTreeID The id of the accessibility tree. | 143 * @param {number} axTreeID The id of the accessibility tree. |
| 144 * @param {number} nodeID The id of a node. | 144 * @param {number} nodeID The id of a node. |
| 145 * @return {string} The pressed state, as undefined, "true", "false" or "mixed". |
| 146 */ |
| 147 var GetPressed = requireNative('automationInternal').GetPressed; |
| 148 |
| 149 /** |
| 150 * @param {number} axTreeID The id of the accessibility tree. |
| 151 * @param {number} nodeID The id of a node. |
| 145 * @return {string} The role of the node, or undefined if the tree or | 152 * @return {string} The role of the node, or undefined if the tree or |
| 146 * node wasn't found. | 153 * node wasn't found. |
| 147 */ | 154 */ |
| 148 var GetRole = requireNative('automationInternal').GetRole; | 155 var GetRole = requireNative('automationInternal').GetRole; |
| 149 | 156 |
| 150 /** | 157 /** |
| 151 * @param {number} axTreeID The id of the accessibility tree. | 158 * @param {number} axTreeID The id of the accessibility tree. |
| 152 * @param {number} nodeID The id of a node. | 159 * @param {number} nodeID The id of a node. |
| 153 * @return {?automation.Rect} The location of the node, or undefined if | 160 * @return {?automation.Rect} The location of the node, or undefined if |
| 154 * the tree or node wasn't found. | 161 * the tree or node wasn't found. |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 }, | 294 }, |
| 288 | 295 |
| 289 get role() { | 296 get role() { |
| 290 return GetRole(this.treeID, this.id); | 297 return GetRole(this.treeID, this.id); |
| 291 }, | 298 }, |
| 292 | 299 |
| 293 get checked() { | 300 get checked() { |
| 294 return GetChecked(this.treeID, this.id); | 301 return GetChecked(this.treeID, this.id); |
| 295 }, | 302 }, |
| 296 | 303 |
| 304 get pressed() { |
| 305 return GetPressed(this.treeID, this.id); |
| 306 }, |
| 307 |
| 297 get location() { | 308 get location() { |
| 298 return GetLocation(this.treeID, this.id); | 309 return GetLocation(this.treeID, this.id); |
| 299 }, | 310 }, |
| 300 | 311 |
| 301 boundsForRange: function(startIndex, endIndex) { | 312 boundsForRange: function(startIndex, endIndex) { |
| 302 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex); | 313 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex); |
| 303 }, | 314 }, |
| 304 | 315 |
| 305 get indexInParent() { | 316 get indexInParent() { |
| 306 return GetIndexInParent(this.treeID, this.id); | 317 return GetIndexInParent(this.treeID, this.id); |
| (...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1122 readonly: $Array.concat(publicAttributes, [ | 1133 readonly: $Array.concat(publicAttributes, [ |
| 1123 'parent', | 1134 'parent', |
| 1124 'firstChild', | 1135 'firstChild', |
| 1125 'lastChild', | 1136 'lastChild', |
| 1126 'children', | 1137 'children', |
| 1127 'previousSibling', | 1138 'previousSibling', |
| 1128 'nextSibling', | 1139 'nextSibling', |
| 1129 'isRootNode', | 1140 'isRootNode', |
| 1130 'role', | 1141 'role', |
| 1131 'checked', | 1142 'checked', |
| 1143 'pressed', |
| 1132 'state', | 1144 'state', |
| 1133 'location', | 1145 'location', |
| 1134 'indexInParent', | 1146 'indexInParent', |
| 1135 'lineStartOffsets', | 1147 'lineStartOffsets', |
| 1136 'root', | 1148 'root', |
| 1137 'htmlAttributes', | 1149 'htmlAttributes', |
| 1138 'nameFrom', | 1150 'nameFrom', |
| 1139 ]), | 1151 ]), |
| 1140 }); | 1152 }); |
| 1141 | 1153 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1166 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { | 1178 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { |
| 1167 return AutomationRootNodeImpl.getOrCreate(treeID); | 1179 return AutomationRootNodeImpl.getOrCreate(treeID); |
| 1168 }); | 1180 }); |
| 1169 | 1181 |
| 1170 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { | 1182 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { |
| 1171 AutomationRootNodeImpl.destroy(treeID); | 1183 AutomationRootNodeImpl.destroy(treeID); |
| 1172 }); | 1184 }); |
| 1173 | 1185 |
| 1174 exports.$set('AutomationNode', AutomationNode); | 1186 exports.$set('AutomationNode', AutomationNode); |
| 1175 exports.$set('AutomationRootNode', AutomationRootNode); | 1187 exports.$set('AutomationRootNode', AutomationRootNode); |
| OLD | NEW |