Chromium Code Reviews| Index: media/audio/audio_device_info_accessor_for_tests.h |
| diff --git a/media/audio/audio_device_info_accessor_for_tests.h b/media/audio/audio_device_info_accessor_for_tests.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..75939bbfd9f2ea8ce5232e52647c7c4b615eb741 |
| --- /dev/null |
| +++ b/media/audio/audio_device_info_accessor_for_tests.h |
| @@ -0,0 +1,49 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef MEDIA_AUDIO_AUDIO_DEVICE_INFO_ACCESSOR_FOR_TESTS_H_ |
| +#define MEDIA_AUDIO_AUDIO_DEVICE_INFO_ACCESSOR_FOR_TESTS_H_ |
| + |
| +#include <string> |
| + |
| +#include "media/audio/audio_device_description.h" |
| +#include "media/base/audio_parameters.h" |
| + |
| +namespace media { |
| + |
| +class AudioManager; |
| + |
| +// Accessor for protected device info-related AudioManager. To be used in media |
| +// unit tests only. |
| +class MEDIA_EXPORT AudioDeviceInfoAccessorForTests { |
|
Max Morin
2017/04/11 07:27:08
I still think having a bunch of friends would be e
|
| + public: |
| + explicit AudioDeviceInfoAccessorForTests(AudioManager* audio_manager); |
| + |
| + bool HasAudioOutputDevices(); |
| + |
| + bool HasAudioInputDevices(); |
| + |
| + void GetAudioInputDeviceDescriptions( |
| + AudioDeviceDescriptions* device_descriptions); |
| + |
| + void GetAudioOutputDeviceDescriptions( |
| + AudioDeviceDescriptions* device_descriptions); |
| + |
| + AudioParameters GetDefaultOutputStreamParameters(); |
| + |
| + AudioParameters GetOutputStreamParameters(const std::string& device_id); |
| + |
| + AudioParameters GetInputStreamParameters(const std::string& device_id); |
| + |
| + std::string GetAssociatedOutputDeviceID(const std::string& input_device_id); |
| + |
| + private: |
| + AudioManager* const audio_manager_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(AudioDeviceInfoAccessorForTests); |
| +}; |
| + |
| +} // namespace media |
| + |
| +#endif // MEDIA_AUDIO_AUDIO_DEVICE_INFO_ACCESSOR_FOR_TESTS_H_ |