| Index: chrome/browser/search/hotword_service_factory.cc
|
| diff --git a/chrome/browser/search/hotword_service_factory.cc b/chrome/browser/search/hotword_service_factory.cc
|
| index d8a061965324dd2d0c639d501872c3861e660f0e..03106422d62cf60922581ac3207e4efbd63494c6 100644
|
| --- a/chrome/browser/search/hotword_service_factory.cc
|
| +++ b/chrome/browser/search/hotword_service_factory.cc
|
| @@ -52,11 +52,17 @@ bool HotwordServiceFactory::IsMicrophoneAvailable() {
|
| return GetInstance()->microphone_available();
|
| }
|
|
|
| +// static
|
| +bool HotwordServiceFactory::IsAudioDeviceStateUpdated() {
|
| + return GetInstance()->audio_device_state_updated();
|
| +}
|
| +
|
| HotwordServiceFactory::HotwordServiceFactory()
|
| : BrowserContextKeyedServiceFactory(
|
| "HotwordService",
|
| BrowserContextDependencyManager::GetInstance()),
|
| - microphone_available_(false) {
|
| + microphone_available_(false),
|
| + audio_device_state_updated_(false) {
|
| // No dependencies.
|
|
|
| // Register with the device observer list to update the microphone
|
| @@ -77,6 +83,7 @@ void HotwordServiceFactory::InitializeMicrophoneObserver() {
|
| void HotwordServiceFactory::OnUpdateAudioDevices(
|
| const content::MediaStreamDevices& devices) {
|
| microphone_available_ = !devices.empty();
|
| + audio_device_state_updated_ = true;
|
| }
|
|
|
| void HotwordServiceFactory::UpdateMicrophoneState() {
|
|
|