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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/audio/audio_pref_handler_impl.h
diff --git a/chrome/browser/chromeos/audio/audio_pref_handler_impl.h b/chrome/browser/chromeos/audio/audio_pref_handler_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..c6e1b3472d90568350b65a19f37ec115c8acefe0
--- /dev/null
+++ b/chrome/browser/chromeos/audio/audio_pref_handler_impl.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_IMPL_H_
+#define CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_IMPL_H_
+
+#include "base/observer_list.h"
+#include "base/prefs/pref_change_registrar.h"
+#include "chromeos/audio/audio_pref_handler.h"
+
+class PrefRegistrySimple;
+class PrefService;
+
+namespace chromeos {
+
+class AudioPrefHandlerImpl : public AudioPrefHandler {
+ public:
+ explicit AudioPrefHandlerImpl(PrefService* local_state);
+
+ // Overriden from AudioPreHandler.
+ virtual double GetOutputVolumeValue() OVERRIDE;
+ virtual void SetOutputVolumeValue(double volume_percent) OVERRIDE;
+ virtual bool GetOutputMuteValue() OVERRIDE;
+ virtual void SetOutputMuteValue(bool mute_on) OVERRIDE;
+ virtual bool GetAudioCaptureAllowedValue() OVERRIDE;
+ virtual bool GetAudioOutputAllowedValue() OVERRIDE;
+ virtual void AddAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
+ virtual void RemoveAudioPrefObserver(AudioPrefObserver* observer) OVERRIDE;
+
+ protected:
+ virtual ~AudioPrefHandlerImpl();
+
+ private:
+ // Initializes the observers for the policy prefs.
+ void InitializePrefObservers();
+
+ // Notifies the AudioPrefObserver for audio policy pref changes.
+ void NotifyAudioPolicyChange();
+
+ PrefService* local_state_; // not owned
+
+ PrefChangeRegistrar pref_change_registrar_;
+
+ ObserverList<AudioPrefObserver> observers_;
+
+ DISALLOW_COPY_AND_ASSIGN(AudioPrefHandlerImpl);
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_AUDIO_AUDIO_PREF_HANDLER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698