| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 14 #include "chromeos/audio/audio_device.h" | 14 #include "chromeos/audio/audio_device.h" |
| 15 #include "chromeos/audio/audio_pref_observer.h" | 15 #include "chromeos/audio/audio_pref_observer.h" |
| 16 #include "chromeos/dbus/audio_node.h" | 16 #include "chromeos/dbus/audio_node.h" |
| 17 #include "chromeos/dbus/cras_audio_client.h" | 17 #include "chromeos/dbus/cras_audio_client.h" |
| 18 #include "chromeos/dbus/volume_state.h" | 18 #include "chromeos/dbus/volume_state.h" |
| 19 | 19 |
| 20 class PrefRegistrySimple; | 20 class PrefRegistrySimple; |
| 21 class PrefService; | 21 class PrefService; |
| 22 | 22 |
| 23 namespace { | |
| 24 | |
| 25 // Default value for the volume pref, as a percent in the range [0.0, 100.0]. | |
| 26 const double kDefaultVolumeGainPercent = 75.0; | |
| 27 | |
| 28 // Values used for muted preference. | |
| 29 const int kPrefMuteOff = 0; | |
| 30 const int kPrefMuteOn = 1; | |
| 31 | |
| 32 } // namespace | |
| 33 | |
| 34 namespace chromeos { | 23 namespace chromeos { |
| 35 | 24 |
| 36 class AudioDevicesPrefHandler; | 25 class AudioDevicesPrefHandler; |
| 37 | 26 |
| 38 class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer, | 27 class CHROMEOS_EXPORT CrasAudioHandler : public CrasAudioClient::Observer, |
| 39 public AudioPrefObserver { | 28 public AudioPrefObserver { |
| 40 public: | 29 public: |
| 41 typedef std::priority_queue<AudioDevice, | 30 typedef std::priority_queue<AudioDevice, |
| 42 std::vector<AudioDevice>, | 31 std::vector<AudioDevice>, |
| 43 AudioDeviceCompare> AudioDevicePriorityQueue; | 32 AudioDeviceCompare> AudioDevicePriorityQueue; |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 243 |
| 255 bool output_mute_locked_; | 244 bool output_mute_locked_; |
| 256 bool input_mute_locked_; | 245 bool input_mute_locked_; |
| 257 | 246 |
| 258 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); | 247 DISALLOW_COPY_AND_ASSIGN(CrasAudioHandler); |
| 259 }; | 248 }; |
| 260 | 249 |
| 261 } // namespace chromeos | 250 } // namespace chromeos |
| 262 | 251 |
| 263 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ | 252 #endif // CHROMEOS_AUDIO_CRAS_AUDIO_HANDLER_H_ |
| OLD | NEW |