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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
234 }, | 234 }, |
235 | 235 |
236 boundsForRange: function(startIndex, endIndex) { | 236 boundsForRange: function(startIndex, endIndex) { |
237 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex); | 237 return GetBoundsForRange(this.treeID, this.id, startIndex, endIndex); |
238 }, | 238 }, |
239 | 239 |
240 get indexInParent() { | 240 get indexInParent() { |
241 return GetIndexInParent(this.treeID, this.id); | 241 return GetIndexInParent(this.treeID, this.id); |
242 }, | 242 }, |
243 | 243 |
| 244 set childTree(node) { |
| 245 this.childTree_ = node; |
| 246 }, |
| 247 |
244 get childTree() { | 248 get childTree() { |
245 var childTreeID = GetIntAttribute(this.treeID, this.id, 'childTreeId'); | 249 return this.childTree_; |
246 if (childTreeID) | |
247 return AutomationRootNodeImpl.get(childTreeID); | |
248 }, | 250 }, |
249 | 251 |
250 get firstChild() { | 252 get firstChild() { |
251 if (this.childTree) | 253 if (this.childTree) |
252 return this.childTree; | 254 return this.childTree; |
253 if (!GetChildCount(this.treeID, this.id)) | 255 if (!GetChildCount(this.treeID, this.id)) |
254 return undefined; | 256 return undefined; |
255 var firstChildID = GetChildIDAtIndex(this.treeID, this.id, 0); | 257 var firstChildID = GetChildIDAtIndex(this.treeID, this.id, 0); |
256 return this.rootImpl.get(firstChildID); | 258 return this.rootImpl.get(firstChildID); |
257 }, | 259 }, |
(...skipping 727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
985 AutomationRootNode.getOrCreate = function(treeID) { | 987 AutomationRootNode.getOrCreate = function(treeID) { |
986 return AutomationRootNodeImpl.getOrCreate(treeID); | 988 return AutomationRootNodeImpl.getOrCreate(treeID); |
987 } | 989 } |
988 | 990 |
989 AutomationRootNode.destroy = function(treeID) { | 991 AutomationRootNode.destroy = function(treeID) { |
990 AutomationRootNodeImpl.destroy(treeID); | 992 AutomationRootNodeImpl.destroy(treeID); |
991 } | 993 } |
992 | 994 |
993 exports.AutomationNode = AutomationNode; | 995 exports.AutomationNode = AutomationNode; |
994 exports.AutomationRootNode = AutomationRootNode; | 996 exports.AutomationRootNode = AutomationRootNode; |
OLD | NEW |