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 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
772 privates(childNode).impl.parentID = privates(node).impl.id; | 772 privates(childNode).impl.parentID = privates(node).impl.id; |
773 } | 773 } |
774 | 774 |
775 return success; | 775 return success; |
776 }, | 776 }, |
777 | 777 |
778 setData_: function(node, nodeData) { | 778 setData_: function(node, nodeData) { |
779 var nodeImpl = privates(node).impl; | 779 var nodeImpl = privates(node).impl; |
780 | 780 |
781 // TODO(dtseng): Make into set listing all hosting node roles. | 781 // TODO(dtseng): Make into set listing all hosting node roles. |
782 if (nodeData.role == schema.RoleType.webView) { | 782 if (nodeData.role == schema.RoleType.webView || |
| 783 nodeData.role == schema.RoleType.embeddedObject) { |
783 if (nodeImpl.childTreeID !== nodeData.intAttributes.childTreeId) | 784 if (nodeImpl.childTreeID !== nodeData.intAttributes.childTreeId) |
784 nodeImpl.pendingChildFrame = true; | 785 nodeImpl.pendingChildFrame = true; |
785 | 786 |
786 if (nodeImpl.pendingChildFrame) { | 787 if (nodeImpl.pendingChildFrame) { |
787 nodeImpl.childTreeID = nodeData.intAttributes.childTreeId; | 788 nodeImpl.childTreeID = nodeData.intAttributes.childTreeId; |
788 automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) { | 789 automationUtil.storeTreeCallback(nodeImpl.childTreeID, function(root) { |
789 nodeImpl.pendingChildFrame = false; | 790 nodeImpl.pendingChildFrame = false; |
790 nodeImpl.childTree = root; | 791 nodeImpl.childTree = root; |
791 privates(root).impl.hostTree = node; | 792 privates(root).impl.hostTree = node; |
792 if (root.attributes.docLoadingProgress == 1) | 793 if (root.attributes.docLoadingProgress == 1) |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1045 'attributes', | 1046 'attributes', |
1046 'indexInParent', | 1047 'indexInParent', |
1047 'root'] }); | 1048 'root'] }); |
1048 | 1049 |
1049 var AutomationRootNode = utils.expose('AutomationRootNode', | 1050 var AutomationRootNode = utils.expose('AutomationRootNode', |
1050 AutomationRootNodeImpl, | 1051 AutomationRootNodeImpl, |
1051 { superclass: AutomationNode }); | 1052 { superclass: AutomationNode }); |
1052 | 1053 |
1053 exports.AutomationNode = AutomationNode; | 1054 exports.AutomationNode = AutomationNode; |
1054 exports.AutomationRootNode = AutomationRootNode; | 1055 exports.AutomationRootNode = AutomationRootNode; |
OLD | NEW |