| 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 832456dd48f54ae4229dfbfff2960da67f46c364..f8eff07671b4cf155cf1982b910a1c10a6e9e4a6 100644
|
| --- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| +++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js
|
| @@ -13,11 +13,13 @@ goog.provide('global');
|
| goog.require('AutomationPredicate');
|
| goog.require('AutomationUtil');
|
| goog.require('ClassicCompatibility');
|
| +goog.require('NextEarcons');
|
| goog.require('Output');
|
| goog.require('Output.EventType');
|
| goog.require('cursors.Cursor');
|
| goog.require('cvox.BrailleKeyCommand');
|
| goog.require('cvox.ChromeVoxEditableTextBase');
|
| +goog.require('cvox.ClassicEarcons');
|
| goog.require('cvox.ExtensionBridge');
|
| goog.require('cvox.NavBraille');
|
|
|
| @@ -115,6 +117,14 @@ Background = function() {
|
| break;
|
| }
|
| }.bind(this));
|
| +
|
| + /** @type {!cvox.AbstractEarcons} @private */
|
| + this.classicEarcons_ = cvox.ChromeVox.earcons || new cvox.ClassicEarcons();
|
| +
|
| + /** @type {!cvox.AbstractEarcons} @private */
|
| + this.nextEarcons_ = new NextEarcons();
|
| +
|
| + cvox.ChromeVox.earcons = this.classicEarcons_;
|
| };
|
|
|
| Background.prototype = {
|
| @@ -735,6 +745,18 @@ Background.prototype = {
|
| }
|
| }.bind(this));
|
|
|
| + // Switch the earcon controller used depending on if we're using
|
| + // ChromeVox Next or Classic, but don't change it if the earcon
|
| + // controller is something else (like for testing).
|
| + if (cvox.ChromeVox.earcons == this.classicEarcons_ ||
|
| + cvox.ChromeVox.earcons == this.nextEarcons_) {
|
| + if (mode === ChromeVoxMode.FORCE_NEXT || mode === ChromeVoxMode.NEXT) {
|
| + cvox.ChromeVox.earcons = this.nextEarcons_;
|
| + } else {
|
| + cvox.ChromeVox.earcons = this.classicEarcons_;
|
| + }
|
| + }
|
| +
|
| this.mode_ = mode;
|
| },
|
|
|
|
|