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

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js

Issue 1319093003: Use new earcons in ChromeVox Next. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@automation_node_id_fix_2
Patch Set: Created 5 years, 4 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/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'),

Powered by Google App Engine
This is Rietveld 408576698