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

Side by Side Diff: chromeos/audio/audio_pref_handler.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 CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_H_
6 #define CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "chromeos/audio/audio_pref_observer.h"
11 #include "chromeos/chromeos_export.h"
12
13 class PrefRegistrySimple;
14
15 namespace chromeos {
16
17 class CHROMEOS_EXPORT AudioPrefHandler
18 : public base::RefCountedThreadSafe<AudioPrefHandler> {
19 public:
20 // Gets the audio output volume value from prefs.
21 virtual double GetOutputVolumeValue() = 0;
22
23 // Sets the output audio volume value to prefs.
24 virtual void SetOutputVolumeValue(double volume_percent) = 0;
25
26 // Reads the audio output mute value from prefs.
27 virtual bool GetOutputMuteValue() = 0;
28
29 // Sets the audio output mute value to prefs.
30 virtual void SetOutputMuteValue(bool mute_on) = 0;
31
32 // Reads the audio capture allowed value from prefs.
33 virtual bool GetAudioCaptureAllowedValue() = 0;
34
35 // Sets the audio output allowed value from prefs.
36 virtual bool GetAudioOutputAllowedValue() = 0;
37
38 // Adds an audio preference observer.
39 virtual void AddAudioPrefObserver(AudioPrefObserver* observer) = 0;
40
41 // Removes an audio preference observer.
42 virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) = 0;
43
44 // Creates the instance.
45 static AudioPrefHandler* Create(PrefService* local_state);
46
47 // Registers volume and mute preferences.
48 static void RegisterPrefs(PrefRegistrySimple* registry);
49
50 protected:
51 virtual ~AudioPrefHandler() {}
52
53 private:
54 friend class base::RefCountedThreadSafe<AudioPrefHandler>;
55 };
56
57 } // namespace chromeos
58
59 #endif // CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698