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

Unified Diff: chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/spoken_messages.js

Issue 1362223003: Improve braille related message descriptions and clean up message handling in Chromevox. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@inputtypeexception
Patch Set: Created 5 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/chromevox/injected/ui/spoken_messages.js
diff --git a/chrome/browser/resources/chromeos/chromevox/chromevox/messages/spoken_messages.js b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/spoken_messages.js
similarity index 77%
rename from chrome/browser/resources/chromeos/chromevox/chromevox/messages/spoken_messages.js
rename to chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/spoken_messages.js
index 6b04b0866a49245a6a813686c582eea59a8fa2a3..201f2bec79d08bda443c126338c75eeb77c8ec90 100644
--- a/chrome/browser/resources/chromeos/chromevox/chromevox/messages/spoken_messages.js
+++ b/chrome/browser/resources/chromeos/chromevox/chromevox/injected/ui/spoken_messages.js
@@ -13,11 +13,19 @@
*
*/
+goog.provide('cvox.SpokenMessage');
goog.provide('cvox.SpokenMessages');
goog.require('cvox.AbstractTts');
goog.require('cvox.ChromeVox');
-goog.require('cvox.SpokenMessage');
+
+/**
+ * @constructor
+ */
+cvox.SpokenMessage = function() {
+ /** @type {Array} */
+ this.id = null;
+};
/**
* @type {Array}
@@ -32,13 +40,6 @@ cvox.SpokenMessages.speakFlush = function() {
};
/**
- * Speaks the message chain after on-going speech finishes.
- */
-cvox.SpokenMessages.speakQueued = function() {
- cvox.SpokenMessages.speak(cvox.QueueMode.QUEUE);
-};
-
-/**
* Speak the message chain.
* @param {cvox.QueueMode} mode The speech queue mode.
*/
@@ -50,7 +51,7 @@ cvox.SpokenMessages.speak = function(mode) {
if (!message || !message.id)
throw 'Invalid message received.';
- var finalText = cvox.ChromeVox.msgs.getMsg.apply(cvox.ChromeVox.msgs,
+ var finalText = Msgs.getMsg.apply(Msgs,
message.id);
dmazzoni 2015/09/25 16:23:35 nit: indentation
cvox.ChromeVox.tts.speak(finalText, mode,
cvox.AbstractTts.PERSONALITY_ANNOUNCEMENT);
@@ -63,16 +64,6 @@ cvox.SpokenMessages.speak = function(mode) {
};
/**
- * The newest message.
- * @return {cvox.SpokenMessage} The newest (current) message.
- */
-cvox.SpokenMessages.currentMessage = function() {
- if (cvox.SpokenMessages.messages.length == 0)
- throw 'Invalid usage of SpokenMessages; start the chain using $m()';
- return cvox.SpokenMessages.messages[cvox.SpokenMessages.messages.length - 1];
-};
-
-/**
* Adds a message.
* @param {string|Array} messageId The id of the message.
* @return {Object} This object, useful for chaining.

Powered by Google App Engine
This is Rietveld 408576698