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

Unified Diff: chrome/browser/ui/webui/voice_search_ui.cc

Issue 1047973003: Notify hotwording extension of microphone state change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/ui/webui/voice_search_ui.cc
diff --git a/chrome/browser/ui/webui/voice_search_ui.cc b/chrome/browser/ui/webui/voice_search_ui.cc
index 6731445ba4b49ed0a4761a55091f49b390d14f7e..b676d3b411440b7cfbab6b8e2c279095fff9e4bd 100644
--- a/chrome/browser/ui/webui/voice_search_ui.cc
+++ b/chrome/browser/ui/webui/voice_search_ui.cc
@@ -270,9 +270,11 @@ class VoiceSearchDomHandler : public WebUIMessageHandler {
AddPair(list, "NaCl Enabled", nacl_enabled);
- AddPair(list,
- "Microphone",
- HotwordServiceFactory::IsMicrophoneAvailable() ? "Yes" : "No");
+ HotwordService* hotword_service =
+ HotwordServiceFactory::GetForProfile(profile_);
+ AddPair(list, "Microphone",
+ hotword_service && hotword_service->microphone_available() ? "Yes"
+ : "No");
std::string audio_capture = "No";
if (profile_->GetPrefs()->GetBoolean(prefs::kAudioCaptureAllowed))

Powered by Google App Engine
This is Rietveld 408576698