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

Unified Diff: chrome/browser/resources/chromeos/chromevox/host/chrome/braille_background.js

Issue 2817313002: Support braille dot or chorded typing conversions to standard keyboard keys (Closed)
Patch Set: Address feedback. 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/host/chrome/braille_background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_background.js b/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_background.js
index 45383bccfe0b3f8f79b4bfe95640798969a0f9cd..a6d3e8c31fc6175da073cc1a634a2247fe811874 100644
--- a/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_background.js
+++ b/chrome/browser/resources/chromeos/chromevox/host/chrome/braille_background.js
@@ -8,6 +8,7 @@
goog.provide('cvox.BrailleBackground');
+goog.require('BrailleKeyEventRewriter');
goog.require('ChromeVoxState');
goog.require('cvox.BrailleDisplayManager');
goog.require('cvox.BrailleInputHandler');
@@ -15,7 +16,6 @@ goog.require('cvox.BrailleInterface');
goog.require('cvox.BrailleKeyEvent');
goog.require('cvox.BrailleTranslatorManager');
-
/**
* @constructor
* @param {cvox.BrailleDisplayManager=} opt_displayManagerForTest
@@ -61,6 +61,9 @@ cvox.BrailleBackground = function(opt_displayManagerForTest,
/** @private {boolean} */
this.frozen_ = false;
+
+ /** @private {BrailleKeyEventRewriter} */
+ this.keyEventRewriter_ = new BrailleKeyEventRewriter();
};
goog.addSingletonGetter(cvox.BrailleBackground);
@@ -149,6 +152,10 @@ cvox.BrailleBackground.prototype.setContent_ = function(
*/
cvox.BrailleBackground.prototype.onBrailleKeyEvent_ = function(
brailleEvt, content) {
+ if (this.keyEventRewriter_.onBrailleKeyEvent(brailleEvt)) {
+ return;
+ }
+
if (this.inputHandler_.onBrailleKeyEvent(brailleEvt)) {
return;
}

Powered by Google App Engine
This is Rietveld 408576698