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

Unified Diff: chrome/browser/resources/chromeos/chromevox/host/interface/tts_interface.js

Issue 604423002: Use an enum for ChromeVox queue mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/host/interface/tts_interface.js
diff --git a/chrome/browser/resources/chromeos/chromevox/host/interface/tts_interface.js b/chrome/browser/resources/chromeos/chromevox/host/interface/tts_interface.js
index c575aa411d9b1e029c3c8e58cdf8de36f425f99b..22b0e7259aae3bc933261a48cc03cda9d3f0aa78 100644
--- a/chrome/browser/resources/chromeos/chromevox/host/interface/tts_interface.js
+++ b/chrome/browser/resources/chromeos/chromevox/host/interface/tts_interface.js
@@ -9,8 +9,24 @@
*
*/
-goog.provide('cvox.TtsInterface');
+goog.provide('cvox.QueueMode');
Peter Lundblad 2014/09/29 13:51:04 In basically all other files, you should add a cor
dmazzoni 2014/09/30 22:01:20 Done.
goog.provide('cvox.TtsCapturingEventListener');
+goog.provide('cvox.TtsInterface');
+
+/**
+ * Queue modes for calls to speak().
Peter Lundblad 2014/09/29 13:51:04 nit: Qualify speak, i.e. {@code cvox.TtsInterface.
dmazzoni 2014/09/30 22:01:20 Done.
+ *
+ * FLUSH: stop speech, clear everything, then speak this utterance.
+ * QUEUE: append this utterance to the end of the queue.
+ * CATEGORY_FLUSH: clear any utterances of the same category (as set by
+ * properties['category']) from the queue, then enqueue this utterance.
+ * @enum
+ */
+cvox.QueueMode = {
+ FLUSH: 0,
Peter Lundblad 2014/09/29 13:51:04 Would be nice to have the jsdoc inside the {} pair
dmazzoni 2014/09/30 22:01:20 Done.
+ QUEUE: 1,
+ CATEGORY_FLUSH: 2
+};
/**
* @interface
@@ -38,8 +54,7 @@ cvox.TtsInterface = function() { };
/**
* Speaks the given string using the specified queueMode and properties.
* @param {string} textString The string of text to be spoken.
- * @param {number=} queueMode The queue mode: cvox.AbstractTts.QUEUE_MODE_FLUSH
- * for flush, cvox.AbstractTts.QUEUE_MODE_QUEUE for adding to queue.
+ * @param {cvox.QueueMode} queueMode The queue mode to use for speaking.
David Tseng 2014/09/26 22:29:23 I pretty much just looked at this file. I assume C
dmazzoni 2014/09/30 22:01:20 Acknowledged.
* @param {Object=} properties Speech properties to use for this utterance.
* @return {cvox.TtsInterface} A tts object useful for chaining speak calls.
*/

Powered by Google App Engine
This is Rietveld 408576698