| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 return false; | 361 return false; |
| 362 } | 362 } |
| 363 | 363 |
| 364 var targetNode = this.get(eventParams.targetID); | 364 var targetNode = this.get(eventParams.targetID); |
| 365 if (targetNode) { | 365 if (targetNode) { |
| 366 var targetNodeImpl = privates(targetNode).impl; | 366 var targetNodeImpl = privates(targetNode).impl; |
| 367 targetNodeImpl.dispatchEvent(eventParams.eventType); | 367 targetNodeImpl.dispatchEvent(eventParams.eventType); |
| 368 } else { | 368 } else { |
| 369 logging.WARNING('Got ' + eventParams.eventType + | 369 logging.WARNING('Got ' + eventParams.eventType + |
| 370 ' event on unknown node: ' + eventParams.targetID + | 370 ' event on unknown node: ' + eventParams.targetID + |
| 371 '; this: ' + this.toString()); | 371 '; this: ' + this.id); |
| 372 } | 372 } |
| 373 return true; | 373 return true; |
| 374 }, | 374 }, |
| 375 | 375 |
| 376 toString: function() { | 376 toString: function() { |
| 377 function toStringInternal(node, indent) { | 377 function toStringInternal(node, indent) { |
| 378 if (!node) | 378 if (!node) |
| 379 return ''; | 379 return ''; |
| 380 var output = | 380 var output = |
| 381 new Array(indent).join(' ') + | 381 new Array(indent).join(' ') + |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 'root'] }); | 608 'root'] }); |
| 609 | 609 |
| 610 var AutomationRootNode = utils.expose('AutomationRootNode', | 610 var AutomationRootNode = utils.expose('AutomationRootNode', |
| 611 AutomationRootNodeImpl, | 611 AutomationRootNodeImpl, |
| 612 { superclass: AutomationNode, | 612 { superclass: AutomationNode, |
| 613 functions: ['load'], | 613 functions: ['load'], |
| 614 readonly: ['loaded'] }); | 614 readonly: ['loaded'] }); |
| 615 | 615 |
| 616 exports.AutomationNode = AutomationNode; | 616 exports.AutomationNode = AutomationNode; |
| 617 exports.AutomationRootNode = AutomationRootNode; | 617 exports.AutomationRootNode = AutomationRootNode; |
| OLD | NEW |