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

Unified Diff: media/audio/mock_audio_manager.cc

Issue 2763383002: Switching AudioInputDeviceManager from using AudioManager interface to AudioSystem one. (Closed)
Patch Set: rebase 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/mock_audio_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/mock_audio_manager.cc
diff --git a/media/audio/mock_audio_manager.cc b/media/audio/mock_audio_manager.cc
index b89cb5e1a8f89179670b8b7126f42e18352ade25..b6c09e0d7077c5826c1dc180c2ae9863ac3f9440 100644
--- a/media/audio/mock_audio_manager.cc
+++ b/media/audio/mock_audio_manager.cc
@@ -115,7 +115,9 @@ AudioParameters MockAudioManager::GetInputStreamParameters(
std::string MockAudioManager::GetAssociatedOutputDeviceID(
const std::string& input_device_id) {
DCHECK(GetTaskRunner()->BelongsToCurrentThread());
- return std::string();
+ return get_associated_output_device_id_cb_.is_null()
+ ? std::string()
+ : get_associated_output_device_id_cb_.Run(input_device_id);
}
std::unique_ptr<AudioLog> MockAudioManager::CreateAudioLog(
@@ -167,4 +169,9 @@ void MockAudioManager::SetOutputDeviceDescriptionsCallback(
get_output_device_descriptions_cb_ = std::move(callback);
}
+void MockAudioManager::SetAssociatedOutputDeviceIDCallback(
+ GetAssociatedOutputDeviceIDCallback callback) {
+ get_associated_output_device_id_cb_ = std::move(callback);
+}
+
} // namespace media.
« no previous file with comments | « media/audio/mock_audio_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698