Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(801)

Side by Side Diff: chrome/renderer/resources/extensions/automation_custom_bindings.js

Issue 2542943002: Generalized fix for serialization error/reset issues (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 privates(targetTree).impl.destroy(); 340 privates(targetTree).impl.destroy();
341 AutomationRootNode.destroy(id); 341 AutomationRootNode.destroy(id);
342 } else { 342 } else {
343 logging.WARNING('no targetTree to destroy'); 343 logging.WARNING('no targetTree to destroy');
344 } 344 }
345 345
346 // Destroy the native cache of the accessibility tree. 346 // Destroy the native cache of the accessibility tree.
347 DestroyAccessibilityTree(id); 347 DestroyAccessibilityTree(id);
348 }); 348 });
349 349
350 automationInternal.onAccessibilityTreeSerializationError.addListener(
351 function(id) {
352 automationInternal.enableFrame(id);
353 });
354
350 var binding = automation.generate(); 355 var binding = automation.generate();
351 // Add additional accessibility bindings not specified in the automation IDL. 356 // Add additional accessibility bindings not specified in the automation IDL.
352 // Accessibility and automation share some APIs (see 357 // Accessibility and automation share some APIs (see
353 // ui/accessibility/ax_enums.idl). 358 // ui/accessibility/ax_enums.idl).
354 forEach(schema, function(k, v) { 359 forEach(schema, function(k, v) {
355 binding[k] = v; 360 binding[k] = v;
356 }); 361 });
357 362
358 exports.$set('binding', binding); 363 exports.$set('binding', binding);
OLDNEW
« no previous file with comments | « chrome/renderer/extensions/automation_internal_custom_bindings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698