Chromium Code Reviews| 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 f3b0d24390c680da0acdec1ee05e133f51b7ba2c..fbfa78efbd70cf4dbf297a391ca4b9e0394117b7 100644 |
| --- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js |
| +++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/background.js |
| @@ -140,10 +140,12 @@ 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'), 1); |
| + this.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_inactive'), |
|
Peter Lundblad
2014/09/29 13:51:03
nit: this file should goog.require cvox.QueueMode.
dmazzoni
2014/09/30 22:01:19
Done.
|
| + cvox.QueueMode.QUEUE); |
| } else if (cvox.PlatformUtil.matchesPlatform(cvox.PlatformFilter.WML)) { |
| // Introductory message. |
| - this.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_intro'), 1); |
| + this.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_intro'), |
| + cvox.QueueMode.QUEUE); |
| cvox.ChromeVox.braille.write(cvox.NavBraille.fromText( |
| cvox.ChromeVox.msgs.getMsg('intro_brl'))); |
| } |
| @@ -196,7 +198,7 @@ cvox.ChromeVoxBackground.prototype.injectChromeVoxIntoTabs = |
| sawError = true; |
| console.error('Could not inject into tab', tab); |
| this.tts.speak('Error starting ChromeVox for ' + |
| - tab.title + ', ' + tab.url, 1); |
| + tab.title + ', ' + tab.url, cvox.QueueMode.QUEUE); |
| }, this)); |
| }, this); |
| @@ -237,7 +239,9 @@ cvox.ChromeVoxBackground.prototype.onTtsMessage = function(msg) { |
| // Tell the handler for native UI (chrome of chrome) events that |
| // the last speech came from web, and not from native UI. |
| this.accessibilityApiHandler_.setWebContext(); |
| - this.tts.speak(msg['text'], msg['queueMode'], msg['properties']); |
| + this.tts.speak(msg['text'], |
| + /** cvox.QueueMode */msg['queueMode'], |
| + msg['properties']); |
| } else if (msg['action'] == 'stop') { |
| this.tts.stop(); |
| } else if (msg['action'] == 'increaseOrDecrease') { |
| @@ -263,13 +267,13 @@ cvox.ChromeVoxBackground.prototype.onTtsMessage = function(msg) { |
| } |
| if (announcement) { |
| this.tts.speak(announcement, |
| - cvox.AbstractTts.QUEUE_MODE_FLUSH, |
| + cvox.QueueMode.FLUSH, |
| cvox.AbstractTts.PERSONALITY_ANNOTATION); |
| } |
| } else if (msg['action'] == 'cyclePunctuationEcho') { |
| this.tts.speak(cvox.ChromeVox.msgs.getMsg( |
| this.backgroundTts_.cyclePunctuationEcho()), |
| - cvox.AbstractTts.QUEUE_MODE_FLUSH); |
| + cvox.QueueMode.FLUSH); |
| } |
| }; |
| @@ -339,7 +343,8 @@ 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(cvox.ChromeVox.msgs.getMsg('chromevox_inactive'), |
| + cvox.QueueMode.FLUSH); |
|
Peter Lundblad
2014/09/29 13:51:03
This changes from QUEUE to flush, I assume that's
dmazzoni
2014/09/30 22:01:19
Acknowledged.
|
| chrome.accessibilityPrivate.setNativeAccessibilityEnabled( |
| true); |
| } else { |
| @@ -350,10 +355,12 @@ 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(cvox.ChromeVox.msgs.getMsg('sticky_mode_enabled'), |
| + cvox.QueueMode.QUEUE); |
| } else { |
| this.tts.speak( |
| - cvox.ChromeVox.msgs.getMsg('sticky_mode_disabled')); |
| + cvox.ChromeVox.msgs.getMsg('sticky_mode_disabled'), |
| + cvox.QueueMode.QUEUE); |
| } |
| } else if (msg['pref'] == 'typingEcho' && msg['announce']) { |
| var announce = ''; |
| @@ -374,7 +381,7 @@ cvox.ChromeVoxBackground.prototype.addBridgeListener = function() { |
| break; |
| } |
| if (announce) { |
| - this.tts.speak(announce); |
| + this.tts.speak(announce, cvox.QueueMode.QUEUE); |
| } |
| } else if (msg['pref'] == 'brailleCaptions') { |
| cvox.BrailleCaptionsBackground.setActive(msg['value']); |
| @@ -528,7 +535,7 @@ cvox.ChromeVoxBackground.prototype.onLoadStateChanged = function( |
| if (loading) { |
| if (makeAnnouncements) { |
| cvox.ChromeVox.tts.speak(cvox.ChromeVox.msgs.getMsg('chromevox_intro'), |
| - 1, |
| + cvox.QueueMode.QUEUE, |
| {doNotInterrupt: true}); |
| cvox.ChromeVox.braille.write(cvox.NavBraille.fromText( |
| cvox.ChromeVox.msgs.getMsg('intro_brl'))); |