diff options
author | jamescook <jamescook@chromium.org> | 2014-12-18 18:55:00 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-19 02:56:00 +0000 |
commit | 15015851a7e550512dd4edc4e422b683f1b54e04 (patch) | |
tree | 9f5d6e43a659bdc7777f5d63dd4d40cfec61dbb9 /chromeos/audio/audio_devices_pref_handler.h | |
parent | 41d028d8cf10b1714f897617c2daed62ab87056a (diff) | |
download | chromium_src-15015851a7e550512dd4edc4e422b683f1b54e04.zip chromium_src-15015851a7e550512dd4edc4e422b683f1b54e04.tar.gz chromium_src-15015851a7e550512dd4edc4e422b683f1b54e04.tar.bz2 |
app_shell: Use real audio preferences and save them to local state
This allows app_shell to support the chrome.audio extension API in the same
way that Chrome does.
* Introduce "local state" for device wide preferences
* Use a real AudioDevicesPrefHandlerImpl in app_shell
This also sets the default output volume for app_shell (for non-HDMI output)
to 75%, which is consistent with Chrome on Chrome OS.
BUG=442401
TEST=chromeos_unittests and app_shell_unittests for audio
TBR=yoz@chromium.org for adding a test data file to extensions/test/data
Review URL: https://codereview.chromium.org/816793002
Cr-Commit-Position: refs/heads/master@{#309138}
Diffstat (limited to 'chromeos/audio/audio_devices_pref_handler.h')
-rw-r--r-- | chromeos/audio/audio_devices_pref_handler.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/chromeos/audio/audio_devices_pref_handler.h b/chromeos/audio/audio_devices_pref_handler.h index 53a3fce..aeb7b3d 100644 --- a/chromeos/audio/audio_devices_pref_handler.h +++ b/chromeos/audio/audio_devices_pref_handler.h @@ -22,6 +22,10 @@ struct AudioDevice; class CHROMEOS_EXPORT AudioDevicesPrefHandler : public base::RefCountedThreadSafe<AudioDevicesPrefHandler> { public: + // Integer because C++ does not allow static const double in header files. + static const int kDefaultOutputVolumePercent = 75; + static const int kDefaultHdmiOutputVolumePercent = 100; + // Gets the audio output volume value from prefs for a device. Since we can // only have either a gain or a volume for a device (depending on whether it // is input or output), we don't really care which value it is. |