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 SwitchAccess and interact with other controllers. | 6 * Class to manage SwitchAccess and interact with other controllers. |
7 * | 7 * |
8 * @constructor | 8 * @constructor |
9 * @implements {SwitchAccessInterface} | 9 * @implements {SwitchAccessInterface} |
10 */ | 10 */ |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 handlePrefsUpdate_: function(event) { | 113 handlePrefsUpdate_: function(event) { |
114 let updatedPrefs = event.detail; | 114 let updatedPrefs = event.detail; |
115 for (let key of Object.keys(updatedPrefs)) { | 115 for (let key of Object.keys(updatedPrefs)) { |
116 switch (key) { | 116 switch (key) { |
117 case 'enableAutoScan': | 117 case 'enableAutoScan': |
118 this.autoScanManager_.setEnabled(updatedPrefs[key]); | 118 this.autoScanManager_.setEnabled(updatedPrefs[key]); |
119 break; | 119 break; |
120 case 'autoScanTime': | 120 case 'autoScanTime': |
121 this.autoScanManager_.setScanTime(updatedPrefs[key]); | 121 this.autoScanManager_.setScanTime(updatedPrefs[key]); |
122 break; | 122 break; |
| 123 default: |
| 124 if (this.switchAccessPrefs.getCommands().includes(key)) |
| 125 this.keyboardHandler_.updateSwitchAccessKeys(); |
123 } | 126 } |
124 } | 127 } |
125 }, | 128 }, |
126 | 129 |
127 /** | 130 /** |
128 * Move to the next sibling of the current node if it has one. | 131 * Move to the next sibling of the current node if it has one. |
129 * | 132 * |
130 * @override | 133 * @override |
131 */ | 134 */ |
132 debugMoveToNext: function() { | 135 debugMoveToNext: function() { |
(...skipping 24 matching lines...) Expand all Loading... |
157 /** | 160 /** |
158 * Move to the parent of the current node if it has one. | 161 * Move to the parent of the current node if it has one. |
159 * | 162 * |
160 * @override | 163 * @override |
161 */ | 164 */ |
162 debugMoveToParent: function() { | 165 debugMoveToParent: function() { |
163 if (this.automationManager_) | 166 if (this.automationManager_) |
164 this.automationManager_.debugMoveToParent(); | 167 this.automationManager_.debugMoveToParent(); |
165 } | 168 } |
166 }; | 169 }; |
OLD | NEW |