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

Unified Diff: chrome/browser/ui/app_list/start_page_service.cc

Issue 922073002: Explicitly reset the speech state when closing the app launcher. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/ui/app_list/start_page_service.cc
diff --git a/chrome/browser/ui/app_list/start_page_service.cc b/chrome/browser/ui/app_list/start_page_service.cc
index c65a3e03a34990a4c1c607e69e34715d0100894b..6f78bfa3c527fd17edd07d3cb8853bf83ce848f4 100644
--- a/chrome/browser/ui/app_list/start_page_service.cc
+++ b/chrome/browser/ui/app_list/start_page_service.cc
@@ -341,6 +341,12 @@ void StartPageService::AppListHidden() {
speech_recognizer_) {
speech_recognizer_->Stop();
speech_recognizer_.reset();
+
+ // When the SpeechRecognizer is destroyed above, we get stuck in the current
+ // speech state instead of being reset into the READY state. Reset the
+ // speech state explicitly so that speech works when the launcher is opened
+ // again.
+ OnSpeechRecognitionStateChanged(SPEECH_RECOGNITION_READY);
}
#if defined(OS_CHROMEOS)
« 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