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

Unified Diff: chromeos/audio/audio_devices_pref_handler_impl.h

Issue 1380103003: Store audio device's active state in preference (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/audio/audio_devices_pref_handler_impl.h
diff --git a/chromeos/audio/audio_devices_pref_handler_impl.h b/chromeos/audio/audio_devices_pref_handler_impl.h
index 7d3055265e113b30a4a4946736791d16b0122924..690c503b3484456b256a381617d9b7316a8c8364 100644
--- a/chromeos/audio/audio_devices_pref_handler_impl.h
+++ b/chromeos/audio/audio_devices_pref_handler_impl.h
@@ -35,6 +35,10 @@ class CHROMEOS_EXPORT AudioDevicesPrefHandlerImpl
bool GetMuteValue(const AudioDevice& device) override;
void SetMuteValue(const AudioDevice& device, bool mute_on) override;
+ AudioDeviceState GetDeviceState(const AudioDevice &device) override;
+ void SetDeviceState(const AudioDevice& device,
+ AudioDeviceState state) override;
+
bool GetAudioOutputAllowedValue() override;
void AddAudioPrefObserver(AudioPrefObserver* observer) override;
@@ -58,6 +62,10 @@ class CHROMEOS_EXPORT AudioDevicesPrefHandlerImpl
void UpdateDevicesVolumePref();
void SaveDevicesVolumePref();
+ // Update and save methods for the active state for all devices.
+ void UpdateDevicesStatePref();
+ void SaveDevicesStatePref();
+
double GetVolumeGainPrefValue(const AudioDevice& device);
double GetDeviceDefaultOutputVolume(const AudioDevice& device);
@@ -73,6 +81,7 @@ class CHROMEOS_EXPORT AudioDevicesPrefHandlerImpl
scoped_ptr<base::DictionaryValue> device_mute_settings_;
scoped_ptr<base::DictionaryValue> device_volume_settings_;
+ scoped_ptr<base::DictionaryValue> device_state_settings_;
PrefService* local_state_; // not owned

Powered by Google App Engine
This is Rietveld 408576698