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

Side by Side Diff: chromeos/audio/audio_devices_pref_handler_impl.h

Issue 856563004: Update {virtual,override,final} to follow C++11 style in chromeos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « chromeos/attestation/mock_attestation_flow.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 5 #ifndef CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
6 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 6 #define CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
11 #include "base/prefs/pref_change_registrar.h" 11 #include "base/prefs/pref_change_registrar.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chromeos/audio/audio_devices_pref_handler.h" 13 #include "chromeos/audio/audio_devices_pref_handler.h"
14 #include "chromeos/chromeos_export.h" 14 #include "chromeos/chromeos_export.h"
15 15
16 class PrefRegistrySimple; 16 class PrefRegistrySimple;
17 class PrefService; 17 class PrefService;
18 18
19 namespace chromeos { 19 namespace chromeos {
20 20
21 // Class which implements AudioDevicesPrefHandler interface and register audio 21 // Class which implements AudioDevicesPrefHandler interface and register audio
22 // preferences as well. 22 // preferences as well.
23 class CHROMEOS_EXPORT AudioDevicesPrefHandlerImpl 23 class CHROMEOS_EXPORT AudioDevicesPrefHandlerImpl
24 : public AudioDevicesPrefHandler { 24 : public AudioDevicesPrefHandler {
25 public: 25 public:
26 // |local_state| is the device-wide preference service. 26 // |local_state| is the device-wide preference service.
27 explicit AudioDevicesPrefHandlerImpl(PrefService* local_state); 27 explicit AudioDevicesPrefHandlerImpl(PrefService* local_state);
28 28
29 // Overridden from AudioDevicesPrefHandler. 29 // Overridden from AudioDevicesPrefHandler.
30 virtual double GetOutputVolumeValue(const AudioDevice* device) override; 30 double GetOutputVolumeValue(const AudioDevice* device) override;
31 virtual double GetInputGainValue(const AudioDevice* device) override; 31 double GetInputGainValue(const AudioDevice* device) override;
32 virtual void SetVolumeGainValue(const AudioDevice& device, 32 void SetVolumeGainValue(const AudioDevice& device, double value) override;
33 double value) override;
34 33
35 virtual bool GetMuteValue(const AudioDevice& device) override; 34 bool GetMuteValue(const AudioDevice& device) override;
36 virtual void SetMuteValue(const AudioDevice& device, bool mute_on) override; 35 void SetMuteValue(const AudioDevice& device, bool mute_on) override;
37 36
38 virtual bool GetAudioOutputAllowedValue() override; 37 bool GetAudioOutputAllowedValue() override;
39 38
40 virtual void AddAudioPrefObserver(AudioPrefObserver* observer) override; 39 void AddAudioPrefObserver(AudioPrefObserver* observer) override;
41 virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) override; 40 void RemoveAudioPrefObserver(AudioPrefObserver* observer) override;
42 41
43 // Registers volume and mute preferences. 42 // Registers volume and mute preferences.
44 static void RegisterPrefs(PrefRegistrySimple* registry); 43 static void RegisterPrefs(PrefRegistrySimple* registry);
45 44
46 protected: 45 protected:
47 virtual ~AudioDevicesPrefHandlerImpl(); 46 ~AudioDevicesPrefHandlerImpl() override;
48 47
49 private: 48 private:
50 // Initializes the observers for the policy prefs. 49 // Initializes the observers for the policy prefs.
51 void InitializePrefObservers(); 50 void InitializePrefObservers();
52 51
53 // Update and save methods for the mute preferences for all devices. 52 // Update and save methods for the mute preferences for all devices.
54 void UpdateDevicesMutePref(); 53 void UpdateDevicesMutePref();
55 void SaveDevicesMutePref(); 54 void SaveDevicesMutePref();
56 55
57 // Update and save methods for the volume preferences for all devices. 56 // Update and save methods for the volume preferences for all devices.
(...skipping 20 matching lines...) Expand all
78 77
79 PrefChangeRegistrar pref_change_registrar_; 78 PrefChangeRegistrar pref_change_registrar_;
80 ObserverList<AudioPrefObserver> observers_; 79 ObserverList<AudioPrefObserver> observers_;
81 80
82 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerImpl); 81 DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerImpl);
83 }; 82 };
84 83
85 } // namespace chromeos 84 } // namespace chromeos
86 85
87 #endif // CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_ 86 #endif // CHROMEOS_AUDIO_AUDIO_DEVICES_PREF_HANDLER_IMPL_H_
OLDNEW
« no previous file with comments | « chromeos/attestation/mock_attestation_flow.h ('k') | chromeos/audio/cras_audio_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698