| OLD | NEW |
| 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 /** | 5 /** |
| 6 * @fileoverview High level commands that the user can invoke using hotkeys. | 6 * @fileoverview High level commands that the user can invoke using hotkeys. |
| 7 * | 7 * |
| 8 * Usage: | 8 * Usage: |
| 9 * If you are here, you probably want to add a new user command. Here are some | 9 * If you are here, you probably want to add a new user command. Here are some |
| 10 * general steps to get you started. | 10 * general steps to get you started. |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 break; | 551 break; |
| 552 case 'toggleChromeVox': | 552 case 'toggleChromeVox': |
| 553 cvox.ChromeVox.host.sendToBackgroundPage({ | 553 cvox.ChromeVox.host.sendToBackgroundPage({ |
| 554 'target': 'Prefs', | 554 'target': 'Prefs', |
| 555 'action': 'setPref', | 555 'action': 'setPref', |
| 556 'pref': 'active', | 556 'pref': 'active', |
| 557 'value': !cvox.ChromeVox.isActive | 557 'value': !cvox.ChromeVox.isActive |
| 558 }); | 558 }); |
| 559 break; | 559 break; |
| 560 case 'toggleChromeVoxVersion': | 560 case 'toggleChromeVoxVersion': |
| 561 case 'showNextUpdatePage': |
| 561 cvox.ChromeVox.host.sendToBackgroundPage({ | 562 cvox.ChromeVox.host.sendToBackgroundPage({ |
| 562 'target': 'toggleChromeVoxVersion' | 563 'target': 'next', |
| 564 'action': cmd |
| 563 }); | 565 }); |
| 564 break; | 566 break; |
| 565 case 'fullyDescribe': | 567 case 'fullyDescribe': |
| 566 var descs = cvox.ChromeVox.navigationManager.getFullDescription(); | 568 var descs = cvox.ChromeVox.navigationManager.getFullDescription(); |
| 567 cvox.ChromeVox.navigationManager.speakDescriptionArray( | 569 cvox.ChromeVox.navigationManager.speakDescriptionArray( |
| 568 descs, | 570 descs, |
| 569 cvox.QueueMode.FLUSH, | 571 cvox.QueueMode.FLUSH, |
| 570 null); | 572 null); |
| 571 break; | 573 break; |
| 572 case 'speakTimeAndDate': | 574 case 'speakTimeAndDate': |
| (...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 819 cmdStruct = goog.object.clone(cmdStruct); | 821 cmdStruct = goog.object.clone(cmdStruct); |
| 820 cmdStruct.command = cmd; | 822 cmdStruct.command = cmd; |
| 821 if (opt_kwargs) { | 823 if (opt_kwargs) { |
| 822 goog.object.extend(cmdStruct, opt_kwargs); | 824 goog.object.extend(cmdStruct, opt_kwargs); |
| 823 } | 825 } |
| 824 return cmdStruct; | 826 return cmdStruct; |
| 825 }; | 827 }; |
| 826 | 828 |
| 827 | 829 |
| 828 cvox.ChromeVoxUserCommands.init_(); | 830 cvox.ChromeVoxUserCommands.init_(); |
| OLD | NEW |