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

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

Issue 2522543004: Add support for retrieving image thumbnails as part of the accessibility tree. (Closed)
Patch Set: Clarified maxSize 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
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 exceptionHandler = require('uncaught_exception_handler'); 8 var exceptionHandler = require('uncaught_exception_handler');
9 var IsInteractPermitted = 9 var IsInteractPermitted =
10 requireNative('automationInternal').IsInteractPermitted; 10 requireNative('automationInternal').IsInteractPermitted;
(...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 }, 360 },
361 361
362 doDefault: function() { 362 doDefault: function() {
363 this.performAction_('doDefault'); 363 this.performAction_('doDefault');
364 }, 364 },
365 365
366 focus: function() { 366 focus: function() {
367 this.performAction_('focus'); 367 this.performAction_('focus');
368 }, 368 },
369 369
370 getImageData: function(maxWidth, maxHeight) {
371 this.performAction_('getImageData',
372 { maxWidth: maxWidth,
373 maxHeight: maxHeight });
374 },
375
370 makeVisible: function() { 376 makeVisible: function() {
371 this.performAction_('makeVisible'); 377 this.performAction_('makeVisible');
372 }, 378 },
373 379
374 setSelection: function(startIndex, endIndex) { 380 setSelection: function(startIndex, endIndex) {
375 if (this.role == 'textField' || this.role == 'textBox') { 381 if (this.role == 'textField' || this.role == 'textBox') {
376 this.performAction_('setSelection', 382 this.performAction_('setSelection',
377 { focusNodeID: this.id, 383 { focusNodeID: this.id,
378 anchorOffset: startIndex, 384 anchorOffset: startIndex,
379 focusOffset: endIndex }); 385 focusOffset: endIndex });
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 'action', 656 'action',
651 'ariaInvalidValue', 657 'ariaInvalidValue',
652 'autoComplete', 658 'autoComplete',
653 'containerLiveRelevant', 659 'containerLiveRelevant',
654 'containerLiveStatus', 660 'containerLiveStatus',
655 'description', 661 'description',
656 'display', 662 'display',
657 'dropeffect', 663 'dropeffect',
658 'help', 664 'help',
659 'htmlTag', 665 'htmlTag',
666 'imageDataUrl',
660 'language', 667 'language',
661 'liveRelevant', 668 'liveRelevant',
662 'liveStatus', 669 'liveStatus',
663 'name', 670 'name',
664 'placeholder', 671 'placeholder',
665 'shortcut', 672 'shortcut',
666 'textInputType', 673 'textInputType',
667 'url', 674 'url',
668 'value']; 675 'value'];
669 676
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1054 1061
1055 function AutomationNode() { 1062 function AutomationNode() {
1056 privates(AutomationNode).constructPrivate(this, arguments); 1063 privates(AutomationNode).constructPrivate(this, arguments);
1057 } 1064 }
1058 utils.expose(AutomationNode, AutomationNodeImpl, { 1065 utils.expose(AutomationNode, AutomationNodeImpl, {
1059 functions: [ 1066 functions: [
1060 'doDefault', 1067 'doDefault',
1061 'find', 1068 'find',
1062 'findAll', 1069 'findAll',
1063 'focus', 1070 'focus',
1071 'getImageData',
1064 'makeVisible', 1072 'makeVisible',
1065 'matches', 1073 'matches',
1066 'setSelection', 1074 'setSelection',
1067 'setSequentialFocusNavigationStartingPoint', 1075 'setSequentialFocusNavigationStartingPoint',
1068 'showContextMenu', 1076 'showContextMenu',
1069 'addEventListener', 1077 'addEventListener',
1070 'removeEventListener', 1078 'removeEventListener',
1071 'domQuerySelector', 1079 'domQuerySelector',
1072 'toString', 1080 'toString',
1073 'boundsForRange', 1081 'boundsForRange',
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) { 1124 utils.defineProperty(AutomationRootNode, 'getOrCreate', function(treeID) {
1117 return AutomationRootNodeImpl.getOrCreate(treeID); 1125 return AutomationRootNodeImpl.getOrCreate(treeID);
1118 }); 1126 });
1119 1127
1120 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) { 1128 utils.defineProperty(AutomationRootNode, 'destroy', function(treeID) {
1121 AutomationRootNodeImpl.destroy(treeID); 1129 AutomationRootNodeImpl.destroy(treeID);
1122 }); 1130 });
1123 1131
1124 exports.$set('AutomationNode', AutomationNode); 1132 exports.$set('AutomationNode', AutomationNode);
1125 exports.$set('AutomationRootNode', AutomationRootNode); 1133 exports.$set('AutomationRootNode', AutomationRootNode);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698