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

Side by Side Diff: chrome/browser/chromeos/accessibility/speech_monitor.cc

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 unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox/background/options.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/accessibility/speech_monitor.h" 5 #include "chrome/browser/chromeos/accessibility/speech_monitor.h"
6 6
7 namespace chromeos { 7 namespace chromeos {
8 8
9 namespace { 9 namespace {
10 const char kChromeVoxEnabledMessage[] = "chrome vox spoken feedback is ready"; 10 const char kChromeVoxEnabledMessage[] = "chrome vox spoken feedback is ready";
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 voice.name = "SpeechMonitor"; 77 voice.name = "SpeechMonitor";
78 voice.events.insert(TTS_EVENT_END); 78 voice.events.insert(TTS_EVENT_END);
79 } 79 }
80 80
81 std::string SpeechMonitor::error() { 81 std::string SpeechMonitor::error() {
82 return ""; 82 return "";
83 } 83 }
84 84
85 void SpeechMonitor::WillSpeakUtteranceWithVoice(const Utterance* utterance, 85 void SpeechMonitor::WillSpeakUtteranceWithVoice(const Utterance* utterance,
86 const VoiceData& voice_data) { 86 const VoiceData& voice_data) {
87 // Filter out empty utterances which can be used to trigger a start event from
88 // tts as an earcon sync.
89 if (utterance->text() == "")
90 return;
91
87 VLOG(0) << "Speaking " << utterance->text(); 92 VLOG(0) << "Speaking " << utterance->text();
88 utterance_queue_.push_back(utterance->text()); 93 utterance_queue_.push_back(utterance->text());
89 if (loop_runner_.get()) 94 if (loop_runner_.get())
90 loop_runner_->Quit(); 95 loop_runner_->Quit();
91 } 96 }
92 97
93 } // namespace chromeos 98 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox/background/options.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698