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

Side by Side Diff: media/audio/audio_system.h

Issue 2801983003: Switching WebRTC browser test from AudioManager::HasAudioOutputDevices() to AudioSystem interface. (Closed)
Patch Set: moved HasAudioOutputDevices() to WebRtcContentBrowserTestBase 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_AUDIO_AUDIO_SYSTEM_H_ 5 #ifndef MEDIA_AUDIO_AUDIO_SYSTEM_H_
6 #define MEDIA_AUDIO_AUDIO_SYSTEM_H_ 6 #define MEDIA_AUDIO_AUDIO_SYSTEM_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "media/audio/audio_device_description.h" 9 #include "media/audio/audio_device_description.h"
10 #include "media/base/audio_parameters.h" 10 #include "media/base/audio_parameters.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // not found. This is best-effort: valid parameters do not guarantee existance 49 // not found. This is best-effort: valid parameters do not guarantee existance
50 // of the device. 50 // of the device.
51 // TODO(olka,tommi): fix all AudioManager implementations to return invalid 51 // TODO(olka,tommi): fix all AudioManager implementations to return invalid
52 // parameters if the device is not found. 52 // parameters if the device is not found.
53 virtual void GetOutputStreamParameters( 53 virtual void GetOutputStreamParameters(
54 const std::string& device_id, 54 const std::string& device_id,
55 OnAudioParamsCallback on_params_cb) const = 0; 55 OnAudioParamsCallback on_params_cb) const = 0;
56 56
57 virtual void HasInputDevices(OnBoolCallback on_has_devices_cb) const = 0; 57 virtual void HasInputDevices(OnBoolCallback on_has_devices_cb) const = 0;
58 58
59 virtual void HasOutputDevices(OnBoolCallback on_has_devices_cb) const = 0;
60
59 // Replies with device descriptions of input audio devices if |for_input| is 61 // Replies with device descriptions of input audio devices if |for_input| is
60 // true, and of output audio devices otherwise. 62 // true, and of output audio devices otherwise.
61 virtual void GetDeviceDescriptions( 63 virtual void GetDeviceDescriptions(
62 OnDeviceDescriptionsCallback on_descriptions_cp, 64 OnDeviceDescriptionsCallback on_descriptions_cp,
63 bool for_input) = 0; 65 bool for_input) = 0;
64 66
65 virtual base::SingleThreadTaskRunner* GetTaskRunner() const = 0; 67 virtual base::SingleThreadTaskRunner* GetTaskRunner() const = 0;
66 68
67 // Must not be used for anything but stream creation. 69 // Must not be used for anything but stream creation.
68 virtual AudioManager* GetAudioManager() const = 0; 70 virtual AudioManager* GetAudioManager() const = 0;
69 71
70 protected: 72 protected:
71 // Sets the global AudioSystem pointer to the specified non-null value. 73 // Sets the global AudioSystem pointer to the specified non-null value.
72 static void SetInstance(AudioSystem* audio_system); 74 static void SetInstance(AudioSystem* audio_system);
73 75
74 // Sets the global AudioSystem pointer to null if it equals the specified one. 76 // Sets the global AudioSystem pointer to null if it equals the specified one.
75 static void ClearInstance(const AudioSystem* audio_system); 77 static void ClearInstance(const AudioSystem* audio_system);
76 }; 78 };
77 79
78 } // namespace media 80 } // namespace media
79 81
80 #endif // MEDIA_AUDIO_AUDIO_SYSTEM_H_ 82 #endif // MEDIA_AUDIO_AUDIO_SYSTEM_H_
OLDNEW
« no previous file with comments | « content/browser/webrtc/webrtc_content_browsertest_base.cc ('k') | media/audio/audio_system_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698