| 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 919 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 930 indent += ' '; | 930 indent += ' '; |
| 931 var children = nodeImpl.children; | 931 var children = nodeImpl.children; |
| 932 for (var i = 0; i < children.length; ++i) | 932 for (var i = 0; i < children.length; ++i) |
| 933 output += toStringInternal(privates(children[i]).impl, indent); | 933 output += toStringInternal(privates(children[i]).impl, indent); |
| 934 return output; | 934 return output; |
| 935 } | 935 } |
| 936 return toStringInternal(this, ''); | 936 return toStringInternal(this, ''); |
| 937 }, | 937 }, |
| 938 }; | 938 }; |
| 939 | 939 |
| 940 var AutomationNode = utils.expose('AutomationNode', | 940 function AutomationNode() { |
| 941 AutomationNodeImpl, | 941 privates(AutomationNode).constructPrivate(this, arguments); |
| 942 { functions: ['doDefault', | 942 } |
| 943 'find', | 943 utils.expose(AutomationNode, AutomationNodeImpl, { |
| 944 'findAll', | 944 functions: [ |
| 945 'focus', | 945 'doDefault', |
| 946 'makeVisible', | 946 'find', |
| 947 'matches', | 947 'findAll', |
| 948 'setSelection', | 948 'focus', |
| 949 'showContextMenu', | 949 'makeVisible', |
| 950 'addEventListener', | 950 'matches', |
| 951 'removeEventListener', | 951 'setSelection', |
| 952 'domQuerySelector', | 952 'showContextMenu', |
| 953 'toString', | 953 'addEventListener', |
| 954 'boundsForRange'], | 954 'removeEventListener', |
| 955 readonly: publicAttributes.concat( | 955 'domQuerySelector', |
| 956 ['parent', | 956 'toString', |
| 957 'firstChild', | 957 'boundsForRange', |
| 958 'lastChild', | 958 ], |
| 959 'children', | 959 readonly: $Array.concat(publicAttributes, [ |
| 960 'previousSibling', | 960 'parent', |
| 961 'nextSibling', | 961 'firstChild', |
| 962 'isRootNode', | 962 'lastChild', |
| 963 'role', | 963 'children', |
| 964 'state', | 964 'previousSibling', |
| 965 'location', | 965 'nextSibling', |
| 966 'indexInParent', | 966 'isRootNode', |
| 967 'root']) }); | 967 'role', |
| 968 'state', |
| 969 'location', |
| 970 'indexInParent', |
| 971 'root', |
| 972 ]), |
| 973 }); |
| 968 | 974 |
| 969 var AutomationRootNode = utils.expose('AutomationRootNode', | 975 function AutomationRootNode() { |
| 970 AutomationRootNodeImpl, | 976 privates(AutomationRootNode).constructPrivate(this, arguments); |
| 971 { superclass: AutomationNode, | 977 } |
| 972 readonly: ['docTitle', | 978 utils.expose(AutomationRootNode, AutomationRootNodeImpl, { |
| 973 'docUrl', | 979 superclass: AutomationNode, |
| 974 'docLoaded', | 980 readonly: [ |
| 975 'docLoadingProgress', | 981 'docTitle', |
| 976 'anchorObject', | 982 'docUrl', |
| 977 'anchorOffset', | 983 'docLoaded', |
| 978 'focusObject', | 984 'docLoadingProgress', |
| 979 'focusOffset'] }); | 985 'anchorObject', |
| 986 'anchorOffset', |
| 987 'focusObject', |
| 988 'focusOffset', |
| 989 ], |
| 990 }); |
| 980 | 991 |
| 981 AutomationRootNode.get = function(treeID) { | 992 AutomationRootNode.get = function(treeID) { |
| 982 return AutomationRootNodeImpl.get(treeID); | 993 return AutomationRootNodeImpl.get(treeID); |
| 983 } | 994 } |
| 984 | 995 |
| 985 AutomationRootNode.getOrCreate = function(treeID) { | 996 AutomationRootNode.getOrCreate = function(treeID) { |
| 986 return AutomationRootNodeImpl.getOrCreate(treeID); | 997 return AutomationRootNodeImpl.getOrCreate(treeID); |
| 987 } | 998 } |
| 988 | 999 |
| 989 AutomationRootNode.destroy = function(treeID) { | 1000 AutomationRootNode.destroy = function(treeID) { |
| 990 AutomationRootNodeImpl.destroy(treeID); | 1001 AutomationRootNodeImpl.destroy(treeID); |
| 991 } | 1002 } |
| 992 | 1003 |
| 993 exports.$set('AutomationNode', AutomationNode); | 1004 exports.$set('AutomationNode', AutomationNode); |
| 994 exports.$set('AutomationRootNode', AutomationRootNode); | 1005 exports.$set('AutomationRootNode', AutomationRootNode); |
| OLD | NEW |