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

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: Fix string format 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
« no previous file with comments | « chromeos/audio/audio_devices_pref_handler.h ('k') | chromeos/audio/audio_devices_pref_handler_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..c2132dbe63f2e58bf143bb2d4889d5fe54ffd0ab 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;
@@ -50,14 +54,18 @@ class CHROMEOS_EXPORT AudioDevicesPrefHandlerImpl
// Initializes the observers for the policy prefs.
void InitializePrefObservers();
- // Update and save methods for the mute preferences for all devices.
- void UpdateDevicesMutePref();
+ // Load and save methods for the mute preferences for all devices.
+ void LoadDevicesMutePref();
void SaveDevicesMutePref();
- // Update and save methods for the volume preferences for all devices.
- void UpdateDevicesVolumePref();
+ // Load and save methods for the volume preferences for all devices.
+ void LoadDevicesVolumePref();
void SaveDevicesVolumePref();
+ // Load and save methods for the active state for all devices.
+ void LoadDevicesStatePref();
+ 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
« no previous file with comments | « chromeos/audio/audio_devices_pref_handler.h ('k') | chromeos/audio/audio_devices_pref_handler_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698