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

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

Issue 1840453002: [Extensions] More bindings hardening (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months 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
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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 privates(targetTree).impl.destroy(); 317 privates(targetTree).impl.destroy();
318 AutomationRootNode.destroy(id); 318 AutomationRootNode.destroy(id);
319 } else { 319 } else {
320 logging.WARNING('no targetTree to destroy'); 320 logging.WARNING('no targetTree to destroy');
321 } 321 }
322 322
323 // Destroy the native cache of the accessibility tree. 323 // Destroy the native cache of the accessibility tree.
324 DestroyAccessibilityTree(id); 324 DestroyAccessibilityTree(id);
325 }); 325 });
326 326
327 exports.binding = automation.generate(); 327 var binding = automation.generate();
328
329 // Add additional accessibility bindings not specified in the automation IDL. 328 // Add additional accessibility bindings not specified in the automation IDL.
330 // Accessibility and automation share some APIs (see 329 // Accessibility and automation share some APIs (see
331 // ui/accessibility/ax_enums.idl). 330 // ui/accessibility/ax_enums.idl).
332 forEach(schema, function(k, v) { 331 forEach(schema, function(k, v) {
333 exports.binding[k] = v; 332 binding[k] = v;
334 }); 333 });
334
335 exports.$set('binding', binding);
336
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698