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 4baf2be25e4004ada815974f654edd323f0cc4c0..1aa72ac258af6fefc989411bca8b1360bb83ad63 100644 |
--- a/chrome/browser/search/hotword_service_factory.cc |
+++ b/chrome/browser/search/hotword_service_factory.cc |
@@ -59,45 +59,16 @@ int HotwordServiceFactory::GetCurrentError(BrowserContext* context) { |
return hotword_service->error_message(); |
} |
-// static |
-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), |
- audio_device_state_updated_(false) { |
+ BrowserContextDependencyManager::GetInstance()) { |
// No dependencies. |
- |
- // Register with the device observer list to update the microphone |
- // availability. |
- BrowserThread::PostTask( |
- BrowserThread::UI, FROM_HERE, |
- base::Bind(&HotwordServiceFactory::InitializeMicrophoneObserver, |
- base::Unretained(this))); |
} |
HotwordServiceFactory::~HotwordServiceFactory() { |
} |
-void HotwordServiceFactory::InitializeMicrophoneObserver() { |
- MediaCaptureDevicesDispatcher::GetInstance()->AddObserver(this); |
-} |
- |
-void HotwordServiceFactory::OnUpdateAudioDevices( |
- const content::MediaStreamDevices& devices) { |
- microphone_available_ = !devices.empty(); |
- audio_device_state_updated_ = true; |
-} |
- |
void HotwordServiceFactory::UpdateMicrophoneState() { |
// In order to trigger the monitor, just call getAudioCaptureDevices. |
content::MediaStreamDevices devices = |