Index: chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js |
diff --git a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js |
index 677030882eab8fc0ff4b4a6acdeaf4375eca2406..af35f3a728e32d6e4408f846ac6a3cd632f0454e 100644 |
--- a/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js |
+++ b/chrome/browser/resources/chromeos/chromevox/cvox2/background/output.js |
@@ -645,6 +645,16 @@ Output.prototype = { |
}, |
/** |
+ * Applies the given speech category to the output. |
+ * @param {cvox.TtsCategory} category |
+ * @return {!Output} |
+ */ |
+ withSpeechCategory: function(category) { |
+ this.speechProperties_['category'] = category; |
+ return this; |
+ }, |
+ |
+ /** |
* Apply a format string directly to the output buffer. This lets you |
* output a message directly to the buffer using the format syntax. |
* @param {string} formatStr |
@@ -677,7 +687,8 @@ Output.prototype = { |
*/ |
go: function() { |
// Speech. |
- var queueMode = cvox.QueueMode.FLUSH; |
+ var queueMode = this.speechProperties_['category'] ? |
+ cvox.QueueMode.CATEGORY_FLUSH : cvox.QueueMode.FLUSH; |
this.speechBuffer_.forEach(function(buff, i, a) { |
if (buff.toString()) { |
(function() { |