| Index: chrome/browser/search/hotword_service_factory.h
|
| diff --git a/chrome/browser/search/hotword_service_factory.h b/chrome/browser/search/hotword_service_factory.h
|
| index c07b6510819f0ea80dac27a8e23a048a786611a3..cc26b48180afd8dcde6afe137354267934a64f9f 100644
|
| --- a/chrome/browser/search/hotword_service_factory.h
|
| +++ b/chrome/browser/search/hotword_service_factory.h
|
| @@ -35,6 +35,11 @@ class HotwordServiceFactory : public MediaCaptureDevicesDispatcher::Observer,
|
| // is browser (not profile) specific, it resides in the factory.
|
| static bool IsMicrophoneAvailable();
|
|
|
| + // Returns whether the state of the audio devices has been updated.
|
| + // Essentially it indicates the validity of the return value from
|
| + // IsMicrophoneAvailable().
|
| + static bool IsAudioDeviceStateUpdated();
|
| +
|
| // Overridden from MediaCaptureDevicesDispatcher::Observer
|
| virtual void OnUpdateAudioDevices(
|
| const content::MediaStreamDevices& devices) override;
|
| @@ -67,6 +72,13 @@ class HotwordServiceFactory : public MediaCaptureDevicesDispatcher::Observer,
|
|
|
| bool microphone_available_;
|
|
|
| + // Indicates if the check for audio devices has been run such that it can be
|
| + // included in the error checking. Audio checking is not done immediately
|
| + // upon start up because of the negative impact on performance.
|
| + bool audio_device_state_updated_;
|
| +
|
| + bool audio_device_state_updated() { return audio_device_state_updated_; }
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(HotwordServiceFactory);
|
| };
|
|
|
|
|