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. |