summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-13 13:24:50 +0200
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-14 10:57:25 +0000
commitaf3d4809763ef308f08ced947a73b624729ac7ea (patch)
tree4402b911e30383f6c6dace1e8cf3b8e85355db3a /chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
parent0e8ff63a407fe323e215bb1a2c423c09a4747c8a (diff)
downloadqtwebengine-chromium-af3d4809763ef308f08ced947a73b624729ac7ea.tar.gz
BASELINE: Update Chromium to 47.0.2526.14
Also adding in sources needed for spellchecking. Change-Id: Idd44170fa1616f26315188970a8d5ba7d472b18a Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js')
-rw-r--r--chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js35
1 files changed, 17 insertions, 18 deletions
diff --git a/chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js b/chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
index 1f072648861..9393c4ad33b 100644
--- a/chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
+++ b/chromium/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js
@@ -8,6 +8,7 @@
goog.provide('cvox.ChromeVoxBackground');
+goog.require('Msgs');
goog.require('cvox.AbstractEarcons');
goog.require('cvox.BrailleBackground');
goog.require('cvox.BrailleCaptionsBackground');
@@ -20,7 +21,6 @@ goog.require('cvox.EarconsBackground');
goog.require('cvox.ExtensionBridge');
goog.require('cvox.HostFactory');
goog.require('cvox.InjectedScriptLoader');
-goog.require('cvox.Msgs');
goog.require('cvox.NavBraille');
// TODO(dtseng): This is required to prevent Closure from stripping our export
// prefs on window.
@@ -55,7 +55,6 @@ cvox.ChromeVoxBackground.prototype.init = function() {
return;
}
- cvox.ChromeVox.msgs = new cvox.Msgs();
this.prefs = new cvox.ChromeVoxPrefs();
this.readPrefs();
@@ -127,14 +126,14 @@ cvox.ChromeVoxBackground.prototype.init = function() {
if (localStorage['active'] == 'false') {
// Warn the user when the browser first starts if ChromeVox is inactive.
- this.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_inactive'),
+ this.tts.speak(Msgs.getMsg('chromevox_inactive'),
cvox.QueueMode.QUEUE);
} else if (cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.WML)) {
// Introductory message.
- this.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_intro'),
+ this.tts.speak(Msgs.getMsg('chromevox_intro'),
cvox.QueueMode.QUEUE);
cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(
- cvox.ChromeVox.msgs.getMsg('intro_brl')));
+ Msgs.getMsg('intro_brl')));
}
};
@@ -234,15 +233,15 @@ cvox.ChromeVoxBackground.prototype.onTtsMessage = function(msg) {
var announcement;
switch (msg['property']) {
case cvox.AbstractTts.RATE:
- announcement = cvox.ChromeVox.msgs.getMsg('announce_rate',
+ announcement = Msgs.getMsg('announce_rate',
[valueAsPercent]);
break;
case cvox.AbstractTts.PITCH:
- announcement = cvox.ChromeVox.msgs.getMsg('announce_pitch',
+ announcement = Msgs.getMsg('announce_pitch',
[valueAsPercent]);
break;
case cvox.AbstractTts.VOLUME:
- announcement = cvox.ChromeVox.msgs.getMsg('announce_volume',
+ announcement = Msgs.getMsg('announce_volume',
[valueAsPercent]);
break;
}
@@ -252,7 +251,7 @@ cvox.ChromeVoxBackground.prototype.onTtsMessage = function(msg) {
cvox.AbstractTts.PERSONALITY_ANNOTATION);
}
} else if (msg['action'] == 'cyclePunctuationEcho') {
- this.tts.speak(cvox.ChromeVox.msgs.getMsg(
+ this.tts.speak(Msgs.getMsg(
this.backgroundTts_.cyclePunctuationEcho()),
cvox.QueueMode.FLUSH);
}
@@ -320,7 +319,7 @@ cvox.ChromeVoxBackground.prototype.addBridgeListener = function() {
if (msg['pref'] == 'active' &&
msg['value'] != cvox.ChromeVox.isActive) {
if (cvox.ChromeVox.isActive) {
- this.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_inactive'),
+ this.tts.speak(Msgs.getMsg('chromevox_inactive'),
cvox.QueueMode.FLUSH);
chrome.accessibilityPrivate.setNativeAccessibilityEnabled(
true);
@@ -332,27 +331,27 @@ cvox.ChromeVoxBackground.prototype.addBridgeListener = function() {
this.earcons.enabled = msg['value'];
} else if (msg['pref'] == 'sticky' && msg['announce']) {
if (msg['value']) {
- this.tts.speak(cvox.ChromeVox.msgs.getMsg('sticky_mode_enabled'),
+ this.tts.speak(Msgs.getMsg('sticky_mode_enabled'),
cvox.QueueMode.QUEUE);
} else {
this.tts.speak(
- cvox.ChromeVox.msgs.getMsg('sticky_mode_disabled'),
+ Msgs.getMsg('sticky_mode_disabled'),
cvox.QueueMode.QUEUE);
}
} else if (msg['pref'] == 'typingEcho' && msg['announce']) {
var announce = '';
switch (msg['value']) {
case cvox.TypingEcho.CHARACTER:
- announce = cvox.ChromeVox.msgs.getMsg('character_echo');
+ announce = Msgs.getMsg('character_echo');
break;
case cvox.TypingEcho.WORD:
- announce = cvox.ChromeVox.msgs.getMsg('word_echo');
+ announce = Msgs.getMsg('word_echo');
break;
case cvox.TypingEcho.CHARACTER_AND_WORD:
- announce = cvox.ChromeVox.msgs.getMsg('character_and_word_echo');
+ announce = Msgs.getMsg('character_and_word_echo');
break;
case cvox.TypingEcho.NONE:
- announce = cvox.ChromeVox.msgs.getMsg('none_echo');
+ announce = Msgs.getMsg('none_echo');
break;
default:
break;
@@ -444,11 +443,11 @@ cvox.ChromeVoxBackground.prototype.isIncognito_ = function() {
* Handles the onIntroduceChromeVox event.
*/
cvox.ChromeVoxBackground.prototype.onIntroduceChromeVox = function() {
- cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_intro'),
+ cvox.ChromeVox.tts.speak(Msgs.getMsg('chromevox_intro'),
cvox.QueueMode.QUEUE,
{doNotInterrupt: true});
cvox.ChromeVox.braille.write(cvox.NavBraille.fromText(
- cvox.ChromeVox.msgs.getMsg('intro_brl')));
+ Msgs.getMsg('intro_brl')));
};