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

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: Rebase Created 5 years, 2 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 9393c4ad33bd1f0b05bf3011aeb6baabcec1d695..4af0e423f58db865791040c296a41b5db01209b1 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
@@ -15,9 +15,9 @@ goog.require('cvox.BrailleCaptionsBackground');
goog.require('cvox.ChromeVox');
goog.require('cvox.ChromeVoxEditableTextBase');
goog.require('cvox.ChromeVoxPrefs');
+goog.require('cvox.ClassicEarcons');
goog.require('cvox.CompositeTts');
goog.require('cvox.ConsoleTts');
-goog.require('cvox.EarconsBackground');
goog.require('cvox.ExtensionBridge');
goog.require('cvox.HostFactory');
goog.require('cvox.InjectedScriptLoader');
@@ -75,7 +75,6 @@ cvox.ChromeVoxBackground.prototype.init = function() {
.add(this.backgroundTts_)
.add(consoleTts);
- this.earcons = new cvox.EarconsBackground();
this.addBridgeListener();
/**
@@ -85,13 +84,14 @@ 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;
+
+ if (!cvox.ChromeVox.earcons)
+ cvox.ChromeVox.earcons = new cvox.ClassicEarcons();
if (cvox.ChromeVox.isChromeOS &&
chrome.accessibilityPrivate.onIntroduceChromeVox) {
@@ -264,7 +264,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);
}
};
@@ -328,7 +328,7 @@ cvox.ChromeVoxBackground.prototype.addBridgeListener = function() {
false);
}
} else if (msg['pref'] == 'earcons') {
- this.earcons.enabled = msg['value'];
+ cvox.AbstractEarcons.enabled = msg['value'];
} else if (msg['pref'] == 'sticky' && msg['announce']) {
if (msg['value']) {
this.tts.speak(Msgs.getMsg('sticky_mode_enabled'),

Powered by Google App Engine
This is Rietveld 408576698