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

Side by Side Diff: chrome/browser/chromeos/audio/audio_pref_handler_impl.h

Issue 14314002: Implement new audio handler which talks to the new audio dbus apis. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix browser_tests compiling issue. Created 7 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_IMPL_H_
6 #define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_IMPL_H_
7
8 #include "base/observer_list.h"
9 #include "base/prefs/pref_change_registrar.h"
10 #include "chromeos/audio/audio_pref_handler.h"
11
12 class PrefRegistrySimple;
13 class PrefService;
14
15 namespace chromeos {
16
17 class AudioPrefHandlerImpl : public AudioPrefHandler {
18 public:
19 explicit AudioPrefHandlerImpl(PrefService* local_state);
20
21 // Overriden from AudioPreHandler.
22 virtual double GetOutputVolumeValue() OVERRIDE;
23 virtual void SetOutputVolumeValue(double volume_percent) OVERRIDE;
24 virtual bool GetOutputMuteValue() OVERRIDE;
25 virtual void SetOutputMuteValue(bool mute_on) OVERRIDE;
26 virtual bool GetAudioCaptureAllowedValue() OVERRIDE;
27 virtual bool GetAudioOutputAllowedValue() OVERRIDE;
28 virtual void AddAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
29 virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
30
31 protected:
32 virtual ~AudioPrefHandlerImpl();
33
34 private:
35 // Initializes the observers for the policy prefs.
36 void InitializePrefObservers();
37
38 // Notifies the AudioPrefObserver for audio policy pref changes.
39 void NotifyAudioPolicyChange();
40
41 PrefService* local_state_; // not owned
42
43 PrefChangeRegistrar pref_change_registrar_;
44
45 ObserverList<AudioPrefObserver> observers_;
46
47 DISALLOW_COPY_AND_ASSIGN(AudioPrefHandlerImpl);
48 };
49
50 } // namespace chromeos
51
52 #endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698