Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js |
index 1f07264886195797cdf01d585b2a7bcb5e69dbb9..f89849792ec0e8f613878c5ab8fb2f047eeac875 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js |
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js |
@@ -76,7 +76,6 @@ cvox.ChromeVoxBackground.prototype.init = function() { |
.add(this.backgroundTts_) |
.add(consoleTts); |
- this.earcons = new cvox.EarconsBackground(); |
this.addBridgeListener(); |
/** |
@@ -86,13 +85,12 @@ cvox.ChromeVoxBackground.prototype.init = function() { |
*/ |
this.backgroundBraille_ = new cvox.BrailleBackground(); |
- this.tabsApiHandler_ = new cvox.TabsApiHandler( |
- this.tts, this.backgroundBraille_, this.earcons); |
+ this.tabsApiHandler_ = new cvox.TabsApiHandler(); |
// Export globals on cvox.ChromeVox. |
cvox.ChromeVox.tts = this.tts; |
cvox.ChromeVox.braille = this.backgroundBraille_; |
- cvox.ChromeVox.earcons = this.earcons; |
+ cvox.ChromeVox.earcons = new cvox.EarconsBackground(); |
if (cvox.ChromeVox.isChromeOS && |
chrome.accessibilityPrivate.onIntroduceChromeVox) { |
@@ -265,7 +263,7 @@ cvox.ChromeVoxBackground.prototype.onTtsMessage = function(msg) { |
*/ |
cvox.ChromeVoxBackground.prototype.onEarconMessage = function(msg) { |
if (msg.action == 'play') { |
- this.earcons.playEarcon(msg.earcon); |
+ cvox.ChromeVox.earcons.playEarcon(msg.earcon); |
} |
}; |
@@ -329,7 +327,7 @@ cvox.ChromeVoxBackground.prototype.addBridgeListener = function() { |
false); |
} |
} else if (msg['pref'] == 'earcons') { |
- this.earcons.enabled = msg['value']; |
+ cvox.ChromeVox.earcons.enabled = msg['value']; |
} else if (msg['pref'] == 'sticky' && msg['announce']) { |
if (msg['value']) { |
this.tts.speak(cvox.ChromeVox.msgs.getMsg('sticky_mode_enabled'), |