| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 | 361 |
| 362 setSelection: function(startIndex, endIndex) { | 362 setSelection: function(startIndex, endIndex) { |
| 363 if (this.role == 'textField' || this.role == 'textBox') { | 363 if (this.role == 'textField' || this.role == 'textBox') { |
| 364 this.performAction_('setSelection', | 364 this.performAction_('setSelection', |
| 365 { focusNodeID: this.id, | 365 { focusNodeID: this.id, |
| 366 anchorOffset: startIndex, | 366 anchorOffset: startIndex, |
| 367 focusOffset: endIndex }); | 367 focusOffset: endIndex }); |
| 368 } | 368 } |
| 369 }, | 369 }, |
| 370 | 370 |
| 371 setSequentialFocusNavigationStartingPoint: function() { |
| 372 this.performAction_('setSequentialFocusNavigationStartingPoint'); |
| 373 }, |
| 374 |
| 371 showContextMenu: function() { | 375 showContextMenu: function() { |
| 372 this.performAction_('showContextMenu'); | 376 this.performAction_('showContextMenu'); |
| 373 }, | 377 }, |
| 374 | 378 |
| 375 domQuerySelector: function(selector, callback) { | 379 domQuerySelector: function(selector, callback) { |
| 376 if (!this.rootImpl) | 380 if (!this.rootImpl) |
| 377 callback(); | 381 callback(); |
| 378 automationInternal.querySelector( | 382 automationInternal.querySelector( |
| 379 { treeID: this.rootImpl.treeID, | 383 { treeID: this.rootImpl.treeID, |
| 380 automationNodeID: this.id, | 384 automationNodeID: this.id, |
| (...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 } | 1030 } |
| 1027 utils.expose(AutomationNode, AutomationNodeImpl, { | 1031 utils.expose(AutomationNode, AutomationNodeImpl, { |
| 1028 functions: [ | 1032 functions: [ |
| 1029 'doDefault', | 1033 'doDefault', |
| 1030 'find', | 1034 'find', |
| 1031 'findAll', | 1035 'findAll', |
| 1032 'focus', | 1036 'focus', |
| 1033 'makeVisible', | 1037 'makeVisible', |
| 1034 'matches', | 1038 'matches', |
| 1035 'setSelection', | 1039 'setSelection', |
| 1040 'setSequentialFocusNavigationStartingPoint', |
| 1036 'showContextMenu', | 1041 'showContextMenu', |
| 1037 'addEventListener', | 1042 'addEventListener', |
| 1038 'removeEventListener', | 1043 'removeEventListener', |
| 1039 'domQuerySelector', | 1044 'domQuerySelector', |
| 1040 'toString', | 1045 'toString', |
| 1041 'boundsForRange', | 1046 'boundsForRange', |
| 1042 ], | 1047 ], |
| 1043 readonly: $Array.concat(publicAttributes, [ | 1048 readonly: $Array.concat(publicAttributes, [ |
| 1044 'parent', | 1049 'parent', |
| 1045 'firstChild', | 1050 'firstChild', |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { | 1087 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { |
| 1083 return AutomationRootNodeImpl.getOrCreate(treeID); | 1088 return AutomationRootNodeImpl.getOrCreate(treeID); |
| 1084 }); | 1089 }); |
| 1085 | 1090 |
| 1086 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { | 1091 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { |
| 1087 AutomationRootNodeImpl.destroy(treeID); | 1092 AutomationRootNodeImpl.destroy(treeID); |
| 1088 }); | 1093 }); |
| 1089 | 1094 |
| 1090 exports.$set('AutomationNode', AutomationNode); | 1095 exports.$set('AutomationNode', AutomationNode); |
| 1091 exports.$set('AutomationRootNode', AutomationRootNode); | 1096 exports.$set('AutomationRootNode', AutomationRootNode); |
| OLD | NEW |