Chromium Code Reviews| 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. |