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

Side by Side Diff: chrome/renderer/resources/extensions/automation/automation_node.js

Issue 642633004: Don't call expensive toString() in onAccessibilityEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | 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 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
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
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;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698