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

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

Issue 2387413002: Improve speech contextual announcements and startCallback synchronization (Closed)
Patch Set: Disable test; it lonly works if you have Google tts installed locally. Created 4 years, 2 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/chrome/tts_background.js
diff --git a/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js b/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js
index 94376942a4745dbc7a8f5d386bfe57119d2cd52c..f8bf898a6a625996064ae6425745a58c4af174c9 100644
--- a/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js
+++ b/chrome/browser/resources/chromeos/chromevox/host/chrome/tts_background.js
@@ -253,29 +253,6 @@ cvox.TtsBackground.prototype.speak = function(
// pattern causes ChromeVox to read numbers as digits rather than words.
textString = this.getNumberAsDigits_(textString);
- // TODO(plundblad): Google TTS doesn't handle strings that don't produce
- // any speech very well. Handle empty and whitespace only strings (including
- // non-breaking space) here to mitigate the issue somewhat.
- if (/^[\s\u00a0]*$/.test(textString)) {
- // We still want to callback for listeners in our content script.
- if (properties['startCallback']) {
- try {
- properties['startCallback']();
- } catch (e) {
- }
- }
- if (properties['endCallback']) {
- try {
- properties['endCallback']();
- } catch (e) {
- }
- }
- if (queueMode === cvox.QueueMode.FLUSH) {
- this.stop();
- }
- return this;
- }
-
var mergedProperties = this.mergeProperties(properties);
if (this.currentVoice) {

Powered by Google App Engine
This is Rietveld 408576698