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

Unified Diff: media/audio/audio_device_info_accessor_for_tests.h

Issue 2799363005: Removing public access to AudioManager device info interface. (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/android/audio_android_unittest.cc ('k') | media/audio/audio_device_info_accessor_for_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..65f0cab9b6d26dbd83a8cb19a9394ae971a20f95
--- /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 AudioDeviceInfoAccessorForTests {
+ 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_
« no previous file with comments | « media/audio/android/audio_android_unittest.cc ('k') | media/audio/audio_device_info_accessor_for_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698