| 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 // Custom bindings for the automation API. | 5 // Custom bindings for the automation API. |
| 6 var AutomationNode = require('automationNode').AutomationNode; | 6 var AutomationNode = require('automationNode').AutomationNode; |
| 7 var AutomationRootNode = require('automationNode').AutomationRootNode; | 7 var AutomationRootNode = require('automationNode').AutomationRootNode; |
| 8 var automation = require('binding').Binding.create('automation'); | 8 var automation = require('binding').Binding.create('automation'); |
| 9 var automationInternal = | 9 var automationInternal = |
| 10 require('binding').Binding.create('automationInternal').generate(); | 10 require('binding').Binding.create('automationInternal').generate(); |
| (...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 324 privates(targetTree).impl.destroy(); | 324 privates(targetTree).impl.destroy(); |
| 325 AutomationRootNode.destroy(id); | 325 AutomationRootNode.destroy(id); |
| 326 } else { | 326 } else { |
| 327 logging.WARNING('no targetTree to destroy'); | 327 logging.WARNING('no targetTree to destroy'); |
| 328 } | 328 } |
| 329 | 329 |
| 330 // Destroy the native cache of the accessibility tree. | 330 // Destroy the native cache of the accessibility tree. |
| 331 DestroyAccessibilityTree(id); | 331 DestroyAccessibilityTree(id); |
| 332 }); | 332 }); |
| 333 | 333 |
| 334 automationInternal.onAccessibilityTreeSerializationError.addListener( |
| 335 function(id) { |
| 336 automationInternal.enableFrame(id); |
| 337 }); |
| 338 |
| 334 var binding = automation.generate(); | 339 var binding = automation.generate(); |
| 335 // Add additional accessibility bindings not specified in the automation IDL. | 340 // Add additional accessibility bindings not specified in the automation IDL. |
| 336 // Accessibility and automation share some APIs (see | 341 // Accessibility and automation share some APIs (see |
| 337 // ui/accessibility/ax_enums.idl). | 342 // ui/accessibility/ax_enums.idl). |
| 338 forEach(schema, function(k, v) { | 343 forEach(schema, function(k, v) { |
| 339 binding[k] = v; | 344 binding[k] = v; |
| 340 }); | 345 }); |
| 341 | 346 |
| 342 exports.$set('binding', binding); | 347 exports.$set('binding', binding); |
| OLD | NEW |