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

Unified Diff: media/audio/audio_system_impl.cc

Issue 2801983003: Switching WebRTC browser test from AudioManager::HasAudioOutputDevices() to AudioSystem interface. (Closed)
Patch Set: moved HasAudioOutputDevices() to WebRtcContentBrowserTestBase Created 3 years, 8 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
« no previous file with comments | « media/audio/audio_system_impl.h ('k') | media/audio/audio_system_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_system_impl.cc
diff --git a/media/audio/audio_system_impl.cc b/media/audio/audio_system_impl.cc
index 00ea330761b28861dc27bd55cdc39f9ffc1c8337..7504744d42173a3c2529a59f3e169970821f94de 100644
--- a/media/audio/audio_system_impl.cc
+++ b/media/audio/audio_system_impl.cc
@@ -121,6 +121,20 @@ void AudioSystemImpl::HasInputDevices(OnBoolCallback on_has_devices_cb) const {
std::move(on_has_devices_cb));
}
+void AudioSystemImpl::HasOutputDevices(OnBoolCallback on_has_devices_cb) const {
+ if (GetTaskRunner()->BelongsToCurrentThread()) {
+ GetTaskRunner()->PostTask(
+ FROM_HERE,
+ base::Bind(on_has_devices_cb, audio_manager_->HasAudioOutputDevices()));
+ return;
+ }
+ base::PostTaskAndReplyWithResult(
+ GetTaskRunner(), FROM_HERE,
+ base::Bind(&AudioManager::HasAudioOutputDevices,
+ base::Unretained(audio_manager_)),
+ std::move(on_has_devices_cb));
+}
+
void AudioSystemImpl::GetDeviceDescriptions(
OnDeviceDescriptionsCallback on_descriptions_cp,
bool for_input) {
« no previous file with comments | « media/audio/audio_system_impl.h ('k') | media/audio/audio_system_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698