Index: chrome/browser/resources/chromeos/chromevox/chromevox/background/accessibility_api_handler.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/background/accessibility_api_handler.js b/chrome/browser/resources/chromeos/chromevox/chromevox/background/accessibility_api_handler.js |
index c015b6d9be3c57926467dd1b1a01969ca3119b6c..982da2c2fe23cd421443e2d860f643bc654ee0ee 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/background/accessibility_api_handler.js |
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/background/accessibility_api_handler.js |
@@ -106,9 +106,9 @@ cvox.AccessibilityApiHandler.prototype.editableTextName = ''; |
/** |
* The queue mode for the next focus event. |
- * @type {number} |
+ * @type {cvox.QueueMode} |
Peter Lundblad
2014/09/29 13:51:03
nit: should goog.require cvox.QueueMode.
dmazzoni
2014/09/30 22:01:19
Done.
|
*/ |
-cvox.AccessibilityApiHandler.prototype.nextQueueMode = 0; |
+cvox.AccessibilityApiHandler.prototype.nextQueueMode = cvox.QueueMode.FLUSH; |
/** |
* The timeout id for the pending text changed event - the return |
@@ -192,12 +192,12 @@ cvox.AccessibilityApiHandler.prototype.addEventListeners_ = function() { |
return; |
} |
this.tts.speak(win.name, |
- cvox.AbstractTts.QUEUE_MODE_FLUSH, |
+ cvox.QueueMode.FLUSH, |
cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT); |
this.braille.write(cvox.NavBraille.fromText(win.name)); |
// Queue the next utterance because a window opening is always followed |
// by a focus event. |
- this.nextQueueMode = 1; |
+ this.nextQueueMode = cvox.QueueMode.QUEUE; |
this.earcons.playEarcon(cvox.AbstractEarcons.OBJECT_OPEN); |
this.queueAlertsForActiveTab(); |
}, this)); |
@@ -217,7 +217,7 @@ cvox.AccessibilityApiHandler.prototype.addEventListeners_ = function() { |
return; |
} |
this.tts.speak(msg('chrome_menu_opened', [menu.name]), |
- cvox.AbstractTts.QUEUE_MODE_FLUSH, |
+ cvox.QueueMode.FLUSH, |
cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT); |
this.braille.write( |
cvox.NavBraille.fromText(msg('chrome_menu_opened', [menu.name]))); |
@@ -275,7 +275,7 @@ cvox.AccessibilityApiHandler.prototype.addEventListeners_ = function() { |
this.earcons.playEarcon(cvox.AbstractEarcons.TASK_SUCCESS); |
this.tts.speak( |
msg('chrome_brightness_changed', [brightness.brightness]), |
- cvox.AbstractTts.QUEUE_MODE_FLUSH, |
+ cvox.QueueMode.FLUSH, |
cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT); |
this.braille.write(cvox.NavBraille.fromText( |
msg('chrome_brightness_changed', [brightness.brightness]))); |
@@ -290,7 +290,7 @@ cvox.AccessibilityApiHandler.prototype.addEventListeners_ = function() { |
// Speak about system update when it's ready, otherwise speak nothing. |
if (status.state == 'NeedRestart') { |
this.tts.speak(msg('chrome_system_need_restart'), |
- cvox.AbstractTts.QUEUE_MODE_FLUSH, |
+ cvox.QueueMode.FLUSH, |
cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT); |
this.braille.write( |
cvox.NavBraille.fromText(msg('chrome_system_need_restart'))); |
@@ -318,7 +318,7 @@ cvox.AccessibilityApiHandler.prototype.addEventListeners_ = function() { |
var description = this.describe(ctl, true); |
this.tts.speak(description.utterance, |
- cvox.AbstractTts.QUEUE_MODE_FLUSH, |
+ cvox.QueueMode.FLUSH, |
description.ttsProps); |
description.braille.write(); |
if (description.earcon) { |
@@ -340,7 +340,7 @@ cvox.AccessibilityApiHandler.prototype.addEventListeners_ = function() { |
var description = this.describe(ctl, false); |
this.tts.speak(description.utterance, |
- cvox.AbstractTts.QUEUE_MODE_FLUSH, |
+ cvox.QueueMode.FLUSH, |
description.ttsProps); |
description.braille.write(); |
if (description.earcon) { |
@@ -427,7 +427,7 @@ cvox.AccessibilityApiHandler.prototype.onControlFocused = function(ctl) { |
this.nextQueueMode, |
description.ttsProps); |
description.braille.write(); |
- this.nextQueueMode = 0; |
+ this.nextQueueMode = cvox.QueueMode.FLUSH; |
if (description.earcon) { |
this.earcons.playEarcon(description.earcon); |
} |
@@ -464,7 +464,7 @@ cvox.AccessibilityApiHandler.prototype.onTtsIdle = function() { |
var utterance = this.idleSpeechQueue_.shift(); |
var msg = goog.bind(cvox.ChromeVox.msgs.getMsg, cvox.ChromeVox.msgs); |
this.tts.speak(utterance, |
- cvox.AbstractTts.QUEUE_MODE_FLUSH, |
+ cvox.QueueMode.FLUSH, |
cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT); |
}; |