| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 * @fileoverview ChromeVox commands. | 6 * @fileoverview ChromeVox commands. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 goog.provide('CommandHandler'); | 9 goog.provide('CommandHandler'); |
| 10 | 10 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 !cvox.BrailleCaptionsBackground.isEnabled()); | 173 !cvox.BrailleCaptionsBackground.isEnabled()); |
| 174 return false; | 174 return false; |
| 175 case 'toggleChromeVoxVersion': | 175 case 'toggleChromeVoxVersion': |
| 176 if (!ChromeVoxState.instance.toggleNext()) | 176 if (!ChromeVoxState.instance.toggleNext()) |
| 177 return false; | 177 return false; |
| 178 if (ChromeVoxState.instance.currentRange) { | 178 if (ChromeVoxState.instance.currentRange) { |
| 179 ChromeVoxState.instance.navigateToRange( | 179 ChromeVoxState.instance.navigateToRange( |
| 180 ChromeVoxState.instance.currentRange); | 180 ChromeVoxState.instance.currentRange); |
| 181 } | 181 } |
| 182 break; | 182 break; |
| 183 case 'help': |
| 184 (new PanelCommand(PanelCommandType.TUTORIAL)).send(); |
| 185 return false; |
| 183 case 'showNextUpdatePage': | 186 case 'showNextUpdatePage': |
| 184 (new PanelCommand(PanelCommandType.TUTORIAL)).send(); | 187 (new PanelCommand(PanelCommandType.UPDATE_NOTES)).send(); |
| 185 return false; | 188 return false; |
| 186 default: | 189 default: |
| 187 break; | 190 break; |
| 188 } | 191 } |
| 189 | 192 |
| 190 // Require a current range. | 193 // Require a current range. |
| 191 if (!ChromeVoxState.instance.currentRange_) | 194 if (!ChromeVoxState.instance.currentRange_) |
| 192 return true; | 195 return true; |
| 193 | 196 |
| 194 // Next/classic compat commands hereafter. | 197 // Next/classic compat commands hereafter. |
| (...skipping 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 737 break; | 740 break; |
| 738 } | 741 } |
| 739 if (announcement) { | 742 if (announcement) { |
| 740 cvox.ChromeVox.tts.speak( | 743 cvox.ChromeVox.tts.speak( |
| 741 announcement, cvox.QueueMode.FLUSH, | 744 announcement, cvox.QueueMode.FLUSH, |
| 742 cvox.AbstractTts.PERSONALITY_ANNOTATION); | 745 cvox.AbstractTts.PERSONALITY_ANNOTATION); |
| 743 } | 746 } |
| 744 }; | 747 }; |
| 745 | 748 |
| 746 }); // goog.scope | 749 }); // goog.scope |
| OLD | NEW |