OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 5 #ifndef CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 6 #define CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
184 // and right channel back to the normal mode. | 184 // and right channel back to the normal mode. |
185 // If the feature is not supported on the device, nothing happens. | 185 // If the feature is not supported on the device, nothing happens. |
186 virtual void SwapInternalSpeakerLeftRightChannel(bool swap); | 186 virtual void SwapInternalSpeakerLeftRightChannel(bool swap); |
187 | 187 |
188 // Enables error logging. | 188 // Enables error logging. |
189 virtual void LogErrors(); | 189 virtual void LogErrors(); |
190 | 190 |
191 protected: | 191 protected: |
192 explicit CrasAudioHandler( | 192 explicit CrasAudioHandler( |
193 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler); | 193 scoped_refptr<AudioDevicesPrefHandler> audio_pref_handler); |
194 virtual ~CrasAudioHandler(); | 194 ~CrasAudioHandler() override; |
195 | 195 |
196 private: | 196 private: |
197 friend class CrasAudioHandlerTest; | 197 friend class CrasAudioHandlerTest; |
198 | 198 |
199 // CrasAudioClient::Observer overrides. | 199 // CrasAudioClient::Observer overrides. |
200 virtual void AudioClientRestarted() override; | 200 void AudioClientRestarted() override; |
201 virtual void NodesChanged() override; | 201 void NodesChanged() override; |
202 virtual void ActiveOutputNodeChanged(uint64 node_id) override; | 202 void ActiveOutputNodeChanged(uint64 node_id) override; |
203 virtual void ActiveInputNodeChanged(uint64 node_id) override; | 203 void ActiveInputNodeChanged(uint64 node_id) override; |
204 | 204 |
205 // AudioPrefObserver overrides. | 205 // AudioPrefObserver overrides. |
206 virtual void OnAudioPolicyPrefChanged() override; | 206 void OnAudioPolicyPrefChanged() override; |
207 | 207 |
208 // SessionManagerClient::Observer overrides. | 208 // SessionManagerClient::Observer overrides. |
209 virtual void EmitLoginPromptVisibleCalled() override; | 209 void EmitLoginPromptVisibleCalled() override; |
210 | 210 |
211 // Sets the active audio output/input node to the node with |node_id|. | 211 // Sets the active audio output/input node to the node with |node_id|. |
212 // If |notify|, notifies Active*NodeChange. | 212 // If |notify|, notifies Active*NodeChange. |
213 void SetActiveOutputNode(uint64 node_id, bool notify); | 213 void SetActiveOutputNode(uint64 node_id, bool notify); |
214 void SetActiveInputNode(uint64 node_id, bool notify); | 214 void SetActiveInputNode(uint64 node_id, bool notify); |
215 | 215 |
216 // Sets up the audio device state based on audio policy and audio settings | 216 // Sets up the audio device state based on audio policy and audio settings |
217 // saved in prefs. | 217 // saved in prefs. |
218 void SetupAudioInputState(); | 218 void SetupAudioInputState(); |
219 void SetupAudioOutputState(); | 219 void SetupAudioOutputState(); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 bool log_errors_; | 320 bool log_errors_; |
321 | 321 |
322 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; | 322 base::WeakPtrFactory<CrasAudioHandler> weak_ptr_factory_; |
323 | 323 |
324 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 324 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
325 }; | 325 }; |
326 | 326 |
327 } // namespace chromeos | 327 } // namespace chromeos |
328 | 328 |
329 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 329 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
OLD | NEW |