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

Unified Diff: media/audio/audio_device_info_accessor_for_tests.h

Issue 2799363005: Removing public access to AudioManager device info interface. (Closed)
Patch Set: missing header for win added 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
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_

Powered by Google App Engine
This is Rietveld 408576698