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

Unified Diff: chromeos/audio/audio_devices_pref_handler_stub.h

Issue 1746843002: Persist the user's active audio device choice across chromeos session and reboots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nits. Created 4 years, 10 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_stub.h
diff --git a/chromeos/audio/audio_devices_pref_handler_stub.h b/chromeos/audio/audio_devices_pref_handler_stub.h
index 508cd270f575bf0423f0569cac8e73c57d5340f4..dd5dd52b37031d0138506c55cd5110c93282dde4 100644
--- a/chromeos/audio/audio_devices_pref_handler_stub.h
+++ b/chromeos/audio/audio_devices_pref_handler_stub.h
@@ -18,9 +18,14 @@ namespace chromeos {
class CHROMEOS_EXPORT AudioDevicesPrefHandlerStub
: public AudioDevicesPrefHandler {
public:
+ struct DeviceState {
+ bool active;
+ bool activate_by_user;
+ };
+
using AudioDeviceMute = std::map<uint64_t, bool>;
using AudioDeviceVolumeGain = std::map<uint64_t, int>;
- using AudioDeviceLastState = std::map<uint64_t, AudioDeviceState>;
+ using AudioDeviceStateMap = std::map<uint64_t, DeviceState>;
AudioDevicesPrefHandlerStub();
@@ -30,9 +35,12 @@ class CHROMEOS_EXPORT AudioDevicesPrefHandlerStub
void SetVolumeGainValue(const AudioDevice& device, double value) override;
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;
+ void SetDeviceActive(const AudioDevice& device,
+ bool active,
+ bool activate_by_user) override;
+ bool GetDeviceActive(const AudioDevice& device,
+ bool* active,
+ bool* activate_by_user) override;
bool GetAudioOutputAllowedValue() override;
void AddAudioPrefObserver(AudioPrefObserver* observer) override;
void RemoveAudioPrefObserver(AudioPrefObserver* observer) override;
@@ -43,7 +51,7 @@ class CHROMEOS_EXPORT AudioDevicesPrefHandlerStub
private:
AudioDeviceMute audio_device_mute_map_;
AudioDeviceVolumeGain audio_device_volume_gain_map_;
- AudioDeviceLastState audio_device_state_map_;
+ AudioDeviceStateMap audio_device_state_map_;
DISALLOW_COPY_AND_ASSIGN(AudioDevicesPrefHandlerStub);
};
« no previous file with comments | « chromeos/audio/audio_devices_pref_handler_impl_unittest.cc ('k') | chromeos/audio/audio_devices_pref_handler_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698