| 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 IsInteractPermitted = | 8 var IsInteractPermitted = |
| 9 requireNative('automationInternal').IsInteractPermitted; | 9 requireNative('automationInternal').IsInteractPermitted; |
| 10 | 10 |
| (...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 721 } | 721 } |
| 722 | 722 |
| 723 return success; | 723 return success; |
| 724 }, | 724 }, |
| 725 | 725 |
| 726 setData_: function(node, nodeData) { | 726 setData_: function(node, nodeData) { |
| 727 var nodeImpl = privates(node).impl; | 727 var nodeImpl = privates(node).impl; |
| 728 | 728 |
| 729 // TODO(dtseng): Make into set listing all hosting node roles. | 729 // TODO(dtseng): Make into set listing all hosting node roles. |
| 730 if (nodeData.role == schema.RoleType.webView) { | 730 if (nodeData.role == schema.RoleType.webView) { |
| 731 if (nodeImpl.pendingChildFrame === undefined) | 731 if (nodeImpl.childTreeID !== nodeData.intAttributes.childTreeId) |
| 732 nodeImpl.pendingChildFrame = true; | 732 nodeImpl.pendingChildFrame = true; |
| 733 | 733 |
| 734 if (nodeImpl.pendingChildFrame) { | 734 if (nodeImpl.pendingChildFrame) { |
| 735 nodeImpl.childTreeID = nodeData.intAttributes.childTreeId; | 735 nodeImpl.childTreeID = nodeData.intAttributes.childTreeId; |
| 736 automationInternal.enableFrame(nodeImpl.childTreeID); | 736 automationInternal.enableFrame(nodeImpl.childTreeID); |
| 737 automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) { | 737 automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) { |
| 738 nodeImpl.pendingChildFrame = false; | 738 nodeImpl.pendingChildFrame = false; |
| 739 nodeImpl.childTree = root; | 739 nodeImpl.childTree = root; |
| 740 privates(root).impl.hostTree = node; | 740 privates(root).impl.hostTree = node; |
| 741 nodeImpl.dispatchEvent(schema.EventType.childrenChanged); | 741 nodeImpl.dispatchEvent(schema.EventType.childrenChanged); |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 983 'attributes', | 983 'attributes', |
| 984 'indexInParent', | 984 'indexInParent', |
| 985 'root'] }); | 985 'root'] }); |
| 986 | 986 |
| 987 var AutomationRootNode = utils.expose('AutomationRootNode', | 987 var AutomationRootNode = utils.expose('AutomationRootNode', |
| 988 AutomationRootNodeImpl, | 988 AutomationRootNodeImpl, |
| 989 { superclass: AutomationNode }); | 989 { superclass: AutomationNode }); |
| 990 | 990 |
| 991 exports.AutomationNode = AutomationNode; | 991 exports.AutomationNode = AutomationNode; |
| 992 exports.AutomationRootNode = AutomationRootNode; | 992 exports.AutomationRootNode = AutomationRootNode; |
| OLD | NEW |