OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 /** | 5 /** |
6 * Class to manage interactions with the accessibility tree, including moving | 6 * Class to manage interactions with the accessibility tree, including moving |
7 * to and selecting nodes. | 7 * to and selecting nodes. |
8 * | 8 * |
9 * @constructor | 9 * @constructor |
10 * @param {!chrome.automation.AutomationNode} desktop | 10 * @param {!chrome.automation.AutomationNode} desktop |
(...skipping 30 matching lines...) Expand all Loading... |
41 this.scopeStack_ = []; | 41 this.scopeStack_ = []; |
42 | 42 |
43 /** | 43 /** |
44 * Moves to the appropriate node in the accessibility tree. | 44 * Moves to the appropriate node in the accessibility tree. |
45 * | 45 * |
46 * @private {!AutomationTreeWalker} | 46 * @private {!AutomationTreeWalker} |
47 */ | 47 */ |
48 this.treeWalker_ = this.createTreeWalker_(desktop); | 48 this.treeWalker_ = this.createTreeWalker_(desktop); |
49 | 49 |
50 this.init_(); | 50 this.init_(); |
51 }; | 51 } |
52 | 52 |
53 /** | 53 /** |
54 * Highlight colors for the focus ring to distinguish between different types | 54 * Highlight colors for the focus ring to distinguish between different types |
55 * of nodes. | 55 * of nodes. |
56 * | 56 * |
57 * @const | 57 * @const |
58 */ | 58 */ |
59 AutomationManager.Color = { | 59 AutomationManager.Color = { |
60 SCOPE: '#de742f', // dark orange | 60 SCOPE: '#de742f', // dark orange |
61 GROUP: '#ffbb33', // light orange | 61 GROUP: '#ffbb33', // light orange |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 */ | 386 */ |
387 debugMoveToParent: function() { | 387 debugMoveToParent: function() { |
388 let parent = this.treeWalker_.debugMoveToParent(this.node_); | 388 let parent = this.treeWalker_.debugMoveToParent(this.node_); |
389 if (parent) { | 389 if (parent) { |
390 this.node_ = parent; | 390 this.node_ = parent; |
391 this.printNode_(this.node_); | 391 this.printNode_(this.node_); |
392 chrome.accessibilityPrivate.setFocusRing([this.node_.location]); | 392 chrome.accessibilityPrivate.setFocusRing([this.node_.location]); |
393 } | 393 } |
394 } | 394 } |
395 }; | 395 }; |
OLD | NEW |