Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2674)

Unified Diff: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js

Issue 2813233002: Add a command to toggle between 6 and 8 dot braille. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
index 9cc9cd73d552e55830c2a2046ce9a11c7f3f3739..db4e23bc3baf2b67c69320b2f690a6bff3e36bf5 100644
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/command_handler.js
@@ -178,6 +178,27 @@ CommandHandler.onCommand = function(command) {
cvox.BrailleCaptionsBackground.setActive(
!cvox.BrailleCaptionsBackground.isEnabled());
return false;
+ case 'toggleBrailleTable':
+ var brailleTableType = localStorage['brailleTableType'];
+ var output = '';
+ if (brailleTableType == 'brailleTable6') {
+ brailleTableType = 'brailleTable8';
+
+ // This label reads "switch to 8 dot braille".
+ output = '@OPTIONS_BRAILLE_TABLE_TYPE_6';
+ } else {
+ brailleTableType = 'brailleTable6';
+
+ // This label reads "switch to 6 dot braille".
+ output = '@OPTIONS_BRAILLE_TABLE_TYPE_8';
+ }
+
+ localStorage['brailleTable'] = localStorage[brailleTableType];
+ localStorage['brailleTableType'] = brailleTableType;
+ cvox.BrailleBackground.getInstance().getTranslatorManager().refresh(
+ localStorage[brailleTableType]);
+ new Output().format(output).go();
+ return false;
case 'toggleChromeVoxVersion':
if (!ChromeVoxState.instance.toggleNext())
return false;

Powered by Google App Engine
This is Rietveld 408576698