| Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
|
| diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
|
| index e4bd58312b4268dcd0d7a081a0e1350efb10e6d0..43b60fa2e33a895665bba72defb95631aac1f16f 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/editing.js
|
| @@ -15,6 +15,7 @@ goog.require('Output');
|
| goog.require('Output.EventType');
|
| goog.require('cursors.Cursor');
|
| goog.require('cursors.Range');
|
| +goog.require('cvox.BrailleBackground');
|
| goog.require('cvox.ChromeVoxEditableTextBase');
|
|
|
| goog.scope(function() {
|
| @@ -219,4 +220,35 @@ editing.TextEditHandler.createForNode = function(node) {
|
| return null;
|
| };
|
|
|
| +/**
|
| + * An observer that reacts to ChromeVox range changes that modifies braille
|
| + * table output when over email or url text fields.
|
| + * @constructor
|
| + * @implements {ChromeVoxStateObserver}
|
| + */
|
| +editing.EditingChromeVoxStateObserver = function() {
|
| + ChromeVoxState.addObserver(this);
|
| +};
|
| +
|
| +editing.EditingChromeVoxStateObserver.prototype = {
|
| + __proto__: ChromeVoxStateObserver,
|
| +
|
| + /** @override */
|
| + onCurrentRangeChanged: function(range) {
|
| + var inputType = range && range.start.node.inputType;
|
| + if (inputType == 'email' || inputType == 'url') {
|
| + cvox.BrailleBackground.getInstance().getTranslatorManager().refresh(
|
| + localStorage['brailleTable8']);
|
| + return;
|
| + }
|
| + cvox.BrailleBackground.getInstance().getTranslatorManager().refresh(
|
| + localStorage['brailleTable']);
|
| + }
|
| +};
|
| +
|
| +/**
|
| + * @private {ChromeVoxStateObserver}
|
| + */
|
| +editing.observer_ = new editing.EditingChromeVoxStateObserver();
|
| +
|
| });
|
|
|