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

Unified Diff: chromeos/audio/cras_audio_handler.cc

Issue 2326623003: Make SystemMonitor report all audio device changes instead of just audio capture. (Closed)
Patch Set: Created 4 years, 3 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: chromeos/audio/cras_audio_handler.cc
diff --git a/chromeos/audio/cras_audio_handler.cc b/chromeos/audio/cras_audio_handler.cc
index 8a2f8876e5c89a7c3569e9766ae4618881458bd9..c085b4a2d57aa9775f55bcf5fd1e47a7150789b6 100644
--- a/chromeos/audio/cras_audio_handler.cc
+++ b/chromeos/audio/cras_audio_handler.cc
@@ -1282,16 +1282,14 @@ void CrasAudioHandler::HandleAudioDeviceChange(
}
// content::MediaStreamManager listens to
- // base::SystemMonitor::DevicesChangedObserver for audio capture devices,
+ // base::SystemMonitor::DevicesChangedObserver for audio devices,
// and updates EnumerateDevices when OnDevicesChanged is called.
- if (is_input) {
- base::SystemMonitor* monitor = base::SystemMonitor::Get();
- // In some unittest, |monitor| might be nullptr.
- if (!monitor)
- return;
- monitor->ProcessDevicesChanged(
- base::SystemMonitor::DeviceType::DEVTYPE_AUDIO_CAPTURE);
- }
+ base::SystemMonitor* monitor = base::SystemMonitor::Get();
+ // In some unittest, |monitor| might be nullptr.
+ if (!monitor)
+ return;
+ monitor->ProcessDevicesChanged(
+ base::SystemMonitor::DeviceType::DEVTYPE_AUDIO);
}
void CrasAudioHandler::HandleGetNodes(const chromeos::AudioNodeList& node_list,

Powered by Google App Engine
This is Rietveld 408576698