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

Side by Side Diff: trunk/src/chrome/browser/chromeos/audio/audio_devices_pref_handler_impl.h

Issue 14655010: Revert 198556 "Implement the rest of the audio API." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
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 CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 6 #define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
7 7
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "base/prefs/pref_change_registrar.h" 9 #include "base/prefs/pref_change_registrar.h"
10 #include "base/values.h" 10 #include "base/values.h"
11 #include "chromeos/audio/audio_devices_pref_handler.h" 11 #include "chromeos/audio/audio_devices_pref_handler.h"
12 12
13 class PrefRegistrySimple; 13 class PrefRegistrySimple;
14 class PrefService; 14 class PrefService;
15 15
16 namespace chromeos { 16 namespace chromeos {
17 17
18 // Class which implements AudioDevicesPrefHandler interface and register audio 18 // Class which implements AudioDevicesPrefHandler interface and register audio
19 // preferences as well. 19 // preferences as well.
20 class AudioDevicesPrefHandlerImpl : public AudioDevicesPrefHandler { 20 class AudioDevicesPrefHandlerImpl : public AudioDevicesPrefHandler {
21 public: 21 public:
22 explicit AudioDevicesPrefHandlerImpl(PrefService* local_state); 22 explicit AudioDevicesPrefHandlerImpl(PrefService* local_state);
23 23
24 // Overridden from AudioDevicesPrefHandler. 24 // Overridden from AudioDevicesPrefHandler.
25 virtual double GetVolumeGainValue(uint64 device_id) OVERRIDE; 25 virtual double GetOutputVolumeValue() OVERRIDE;
26 virtual void SetVolumeGainValue(uint64 device_id, double value) OVERRIDE; 26 virtual bool GetOutputMuteValue() OVERRIDE;
27 27 virtual void SetOutputVolumeValue(double volume_percent) OVERRIDE;
28 virtual bool GetMuteValue(uint64 device_id) OVERRIDE; 28 virtual void SetOutputMuteValue(bool mute_on) OVERRIDE;
29 virtual void SetMuteValue(uint64 device_id, bool mute_on) OVERRIDE;
30
31 virtual bool GetAudioCaptureAllowedValue() OVERRIDE; 29 virtual bool GetAudioCaptureAllowedValue() OVERRIDE;
32 virtual bool GetAudioOutputAllowedValue() OVERRIDE; 30 virtual bool GetAudioOutputAllowedValue() OVERRIDE;
33
34 virtual void AddAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE; 31 virtual void AddAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
35 virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE; 32 virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
36 33
37 // Registers volume and mute preferences. 34 // Registers volume and mute preferences.
38 static void RegisterPrefs(PrefRegistrySimple* registry); 35 static void RegisterPrefs(PrefRegistrySimple* registry);
39 36
40 protected: 37 protected:
41 virtual ~AudioDevicesPrefHandlerImpl(); 38 virtual ~AudioDevicesPrefHandlerImpl();
42 39
43 private: 40 private:
(...skipping 24 matching lines...) Expand all
68 PrefService* local_state_; // not owned 65 PrefService* local_state_; // not owned
69 PrefChangeRegistrar pref_change_registrar_; 66 PrefChangeRegistrar pref_change_registrar_;
70 ObserverList<AudioPrefObserver> observers_; 67 ObserverList<AudioPrefObserver> observers_;
71 68
72 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerImpl); 69 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerImpl);
73 }; 70 };
74 71
75 } // namespace chromeos 72 } // namespace chromeos
76 73
77 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 74 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698