Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
index 6bde6b1e846b6ec9ccb62f52b8ee931063e022a4..5bb97e200e8b63b63049a2e931be4fb4b514c145 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js |
@@ -12,6 +12,7 @@ goog.provide('global'); |
goog.require('AutomationPredicate'); |
goog.require('AutomationUtil'); |
+goog.require('Output'); |
goog.require('cursors.Cursor'); |
goog.require('cvox.TabsApiHandler'); |
@@ -58,6 +59,12 @@ Background = function() { |
*/ |
this.active_ = false; |
+ /** |
+ * @type {!Output} |
+ * @private |
+ */ |
+ this.output_ = new Output(); |
+ |
// Only needed with unmerged ChromeVox classic loaded before. |
global.accessibility.setAccessibilityEnabled(false); |
@@ -144,6 +151,18 @@ Background.prototype = { |
dir = Dir.BACKWARD; |
pred = AutomationPredicate.heading; |
break; |
+ case 'nextCharacter': |
+ current = current.move(cursors.Unit.CHARACTER, Dir.FORWARD); |
+ break; |
+ case 'previousCharacter': |
+ current = current.move(cursors.Unit.CHARACTER, Dir.BACKWARD); |
+ break; |
+ case 'nextWord': |
+ current = current.move(cursors.Unit.WORD, Dir.FORWARD); |
+ break; |
+ case 'previousWord': |
+ current = current.move(cursors.Unit.WORD, Dir.BACKWARD); |
+ break; |
case 'nextLine': |
current = current.move(cursors.Unit.LINE, Dir.FORWARD); |
break; |
@@ -194,7 +213,7 @@ Background.prototype = { |
current.getStart().getNode().focus(); |
this.currentRange_ = current; |
- this.handleOutput(this.currentRange_); |
+ this.output_.output(this.currentRange_); |
} |
}, |
@@ -208,7 +227,7 @@ Background.prototype = { |
return; |
this.currentRange_ = cursors.Range.fromNode(node); |
- this.handleOutput(this.currentRange_); |
+ this.output_.output(this.currentRange_); |
}, |
/** |
@@ -226,7 +245,7 @@ Background.prototype = { |
this.currentRange_ = cursors.Range.fromNode(node); |
if (this.currentRange_) |
- this.handleOutput(this.currentRange_); |
+ this.output_.output(this.currentRange_); |
}, |
/** |