OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 // AudioOutputDeviceEnumerator is used to enumerate audio output devices. | 5 // AudioOutputDeviceEnumerator is used to enumerate audio output devices. |
6 // It can return cached results of previous enumerations in order to boost | 6 // It can return cached results of previous enumerations in order to boost |
7 // performance. | 7 // performance. |
8 // All its public methods must be called on the thread where the object is | 8 // All its public methods must be called on the thread where the object is |
9 // created. | 9 // created. |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 namespace media { | 32 namespace media { |
33 class AudioManager; | 33 class AudioManager; |
34 } | 34 } |
35 | 35 |
36 namespace content { | 36 namespace content { |
37 | 37 |
38 // AudioOutputDeviceInfo describes information about an audio output device. | 38 // AudioOutputDeviceInfo describes information about an audio output device. |
39 // The enumerations returned by AudioOutputDeviceEnumerator::Enumerate() contain | 39 // The enumerations returned by AudioOutputDeviceEnumerator::Enumerate() contain |
40 // elements of this type. It is used only in the browser side. | 40 // elements of this type. It is used only in the browser side. |
41 struct AudioOutputDeviceInfo { | 41 struct AudioOutputDeviceInfo { |
| 42 AudioOutputDeviceInfo(); |
| 43 AudioOutputDeviceInfo(const AudioOutputDeviceInfo& audio_output_device_info); |
| 44 AudioOutputDeviceInfo(AudioOutputDeviceInfo&& audio_output_device_info); |
| 45 AudioOutputDeviceInfo& operator=( |
| 46 const AudioOutputDeviceInfo& audio_output_device_info); |
| 47 AudioOutputDeviceInfo(const std::string& unique_id, |
| 48 const std::string& device_name, |
| 49 const std::string& group_id, |
| 50 media::AudioParameters output_params); |
| 51 ~AudioOutputDeviceInfo(); |
42 std::string unique_id; | 52 std::string unique_id; |
43 std::string device_name; | 53 std::string device_name; |
| 54 std::string group_id; |
44 media::AudioParameters output_params; | 55 media::AudioParameters output_params; |
45 }; | 56 }; |
46 | 57 |
47 // The result of an enumeration. It is used only in the browser side. | 58 // The result of an enumeration. It is used only in the browser side. |
48 struct AudioOutputDeviceEnumeration { | 59 struct AudioOutputDeviceEnumeration { |
49 public: | 60 public: |
50 AudioOutputDeviceEnumeration( | 61 AudioOutputDeviceEnumeration( |
51 const std::vector<AudioOutputDeviceInfo>& devices, | 62 const std::vector<AudioOutputDeviceInfo>& devices, |
52 bool has_actual_devices); | 63 bool has_actual_devices); |
53 AudioOutputDeviceEnumeration(); | 64 AudioOutputDeviceEnumeration(); |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 127 |
117 base::ThreadChecker thread_checker_; | 128 base::ThreadChecker thread_checker_; |
118 base::WeakPtrFactory<AudioOutputDeviceEnumerator> weak_factory_; | 129 base::WeakPtrFactory<AudioOutputDeviceEnumerator> weak_factory_; |
119 | 130 |
120 DISALLOW_COPY_AND_ASSIGN(AudioOutputDeviceEnumerator); | 131 DISALLOW_COPY_AND_ASSIGN(AudioOutputDeviceEnumerator); |
121 }; | 132 }; |
122 | 133 |
123 } // namespace content | 134 } // namespace content |
124 | 135 |
125 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DEVICE_ENUMERATOR_H_ | 136 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_AUDIO_OUTPUT_DEVICE_ENUMERATOR_H_ |
OLD | NEW |