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

Unified Diff: chrome/browser/extensions/extension_tts_api_win.cc

Issue 6249014: Fix implementation of StopSpeaking, and implement IsSpeaking, for the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tts_api_win.cc
===================================================================
--- chrome/browser/extensions/extension_tts_api_win.cc (revision 72316)
+++ chrome/browser/extensions/extension_tts_api_win.cc (working copy)
@@ -94,7 +94,7 @@
}
bool ExtensionTtsPlatformImplWin::StopSpeaking() {
- if (!speech_synthesizer_ && !paused_) {
+ if (speech_synthesizer_ && !paused_) {
speech_synthesizer_->Pause();
paused_ = true;
}
@@ -102,6 +102,12 @@
}
bool ExtensionTtsPlatformImplWin::IsSpeaking() {
+ if (speech_synthesizer_ && !paused_) {
+ SPVOICESTATUS status;
+ HRESULT result = speech_synthesizer_->GetStatus(&status, NULL);
+ if (result == S_OK && status.dwRunningState == SPRS_IS_SPEAKING)
+ return true;
+ }
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698