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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 chrome.tabs.create(optionsPage); | 128 chrome.tabs.create(optionsPage); |
129 }, | 129 }, |
130 | 130 |
131 /** | 131 /** |
132 * Perform actions as the result of actions by the user. Currently, restarts | 132 * Perform actions as the result of actions by the user. Currently, restarts |
133 * auto-scan if it is enabled. | 133 * auto-scan if it is enabled. |
134 * | 134 * |
135 * @override | 135 * @override |
136 */ | 136 */ |
137 performedUserAction: function() { | 137 performedUserAction: function() { |
138 if (this.autoScanManager_.isRunning()) | 138 this.autoScanManager_.restartIfRunning(); |
139 this.autoScanManager_.restart(); | |
140 }, | 139 }, |
141 | 140 |
142 /** | 141 /** |
143 * Handle a change in user preferences. | 142 * Handle a change in user preferences. |
144 * | 143 * |
145 * @param {!Event} event | 144 * @param {!Event} event |
146 * @private | 145 * @private |
147 */ | 146 */ |
148 handlePrefsUpdate_: function(event) { | 147 handlePrefsUpdate_: function(event) { |
149 let updatedPrefs = event.detail; | 148 let updatedPrefs = event.detail; |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
236 */ | 235 */ |
237 debugMoveToParent: function() { | 236 debugMoveToParent: function() { |
238 let parent = this.treeWalker_.debugMoveToParent(this.node_); | 237 let parent = this.treeWalker_.debugMoveToParent(this.node_); |
239 if (parent) { | 238 if (parent) { |
240 this.node_ = parent; | 239 this.node_ = parent; |
241 this.printNode_(this.node_); | 240 this.printNode_(this.node_); |
242 chrome.accessibilityPrivate.setFocusRing([this.node_.location]); | 241 chrome.accessibilityPrivate.setFocusRing([this.node_.location]); |
243 } | 242 } |
244 } | 243 } |
245 }; | 244 }; |
OLD | NEW |