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

Side by Side Diff: media/audio/audio_device_info_accessor_for_tests.cc

Issue 2799363005: Removing public access to AudioManager device info interface. (Closed)
Patch Set: rebase Created 3 years, 7 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 unified diff | Download patch
« no previous file with comments | « media/audio/audio_device_info_accessor_for_tests.h ('k') | media/audio/audio_input_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "media/audio/audio_device_info_accessor_for_tests.h"
6
7 #include "base/single_thread_task_runner.h"
8 #include "media/audio/audio_manager.h"
9
10 namespace media {
11
12 AudioDeviceInfoAccessorForTests::AudioDeviceInfoAccessorForTests(
13 AudioManager* audio_manager)
14 : audio_manager_(audio_manager) {
15 DCHECK(audio_manager_);
16 }
17
18 bool AudioDeviceInfoAccessorForTests::HasAudioOutputDevices() {
19 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
20 return audio_manager_->HasAudioOutputDevices();
21 }
22
23 bool AudioDeviceInfoAccessorForTests::HasAudioInputDevices() {
24 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
25 return audio_manager_->HasAudioInputDevices();
26 }
27
28 void AudioDeviceInfoAccessorForTests::GetAudioInputDeviceDescriptions(
29 AudioDeviceDescriptions* device_descriptions) {
30 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
31 audio_manager_->GetAudioInputDeviceDescriptions(device_descriptions);
32 }
33
34 void AudioDeviceInfoAccessorForTests::GetAudioOutputDeviceDescriptions(
35 AudioDeviceDescriptions* device_descriptions) {
36 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
37 audio_manager_->GetAudioOutputDeviceDescriptions(device_descriptions);
38 }
39
40 AudioParameters
41 AudioDeviceInfoAccessorForTests::GetDefaultOutputStreamParameters() {
42 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
43 return audio_manager_->GetDefaultOutputStreamParameters();
44 }
45
46 AudioParameters AudioDeviceInfoAccessorForTests::GetOutputStreamParameters(
47 const std::string& device_id) {
48 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
49 return audio_manager_->GetOutputStreamParameters(device_id);
50 }
51
52 AudioParameters AudioDeviceInfoAccessorForTests::GetInputStreamParameters(
53 const std::string& device_id) {
54 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
55 return audio_manager_->GetInputStreamParameters(device_id);
56 }
57
58 std::string AudioDeviceInfoAccessorForTests::GetAssociatedOutputDeviceID(
59 const std::string& input_device_id) {
60 DCHECK(audio_manager_->GetTaskRunner()->BelongsToCurrentThread());
61 return audio_manager_->GetAssociatedOutputDeviceID(input_device_id);
62 }
63
64 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/audio_device_info_accessor_for_tests.h ('k') | media/audio/audio_input_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698