diff options
author | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-18 04:42:43 +0000 |
---|---|---|
committer | jennyz@chromium.org <jennyz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-18 04:42:43 +0000 |
commit | eed4c7668f0f57ee6d5599fed72b52e70bf873a3 (patch) | |
tree | 67ab490c63e404bb86f446ce8c3b926c71816f95 /ash/ash_switches.cc | |
parent | 8f337212cc8c13bbeb38c54d150f7f848e245b07 (diff) | |
download | chromium_src-eed4c7668f0f57ee6d5599fed72b52e70bf873a3.zip chromium_src-eed4c7668f0f57ee6d5599fed72b52e70bf873a3.tar.gz chromium_src-eed4c7668f0f57ee6d5599fed72b52e70bf873a3.tar.bz2 |
Enable audio selection menu by default and fix unitializated memory issue in tray_audio.cc.
BUG=259989
TBR=jamescook
Review URL: https://chromiumcodereview.appspot.com/19645002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@212250 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/ash_switches.cc')
-rw-r--r-- | ash/ash_switches.cc | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc index d66c15b..373bd1b 100644 --- a/ash/ash_switches.cc +++ b/ash/ash_switches.cc @@ -44,6 +44,13 @@ const char kAshDefaultGuestWallpaperSmall[] = const char kAshDefaultWallpaperLarge[] = "ash-default-wallpaper-large"; const char kAshDefaultWallpaperSmall[] = "ash-default-wallpaper-small"; +#if defined(OS_CHROMEOS) +// Disable the status tray volume menu for allowing the user to choose an audio +// input and output device. +const char kAshDisableAudioDeviceMenu[] = + "ash-disable-audio-device-menu"; +#endif + // Disable auto window maximization logic. const char kAshDisableAutoMaximizing[] = "ash-disable-auto-maximizing"; @@ -56,8 +63,10 @@ const char kAshDisableAutoWindowPlacement[] = const char kAshDisableDisplayChangeLimiter[] = "ash-disable-display-change-limiter"; +#if defined(OS_CHROMEOS) // Disable the new cras audio handler. const char kAshDisableNewAudioHandler[] = "ash-disable-new-audio-handler"; +#endif // If present new lock animations are enabled. const char kAshDisableNewLockAnimations[] = "ash-disable-new-lock-animations"; @@ -84,11 +93,6 @@ const char kAshDisableUsbChargerNotification[] = "ash-disable-usb-charger-notification"; #endif -// Extend the status tray volume item to allow the user to choose an audio -// input and output device. -const char kAshEnableAudioDeviceMenu[] = - "ash-enable-audio-device-menu"; - // Enable advanced gestures (e.g. for window management). const char kAshEnableAdvancedGestures[] = "ash-enable-advanced-gestures"; @@ -181,6 +185,12 @@ const char kAshDisableDragAndDropAppListToLauncher[] = // in maximized mode. const char kForcedMaximizeMode[] = "forced-maximize-mode"; +bool UseAlternateShelfLayout() { + return CommandLine::ForCurrentProcess()-> + HasSwitch(ash::switches::kAshUseAlternateShelfLayout); +} + +#if defined(OS_CHROMEOS) bool UseNewAudioHandler() { return !CommandLine::ForCurrentProcess()-> HasSwitch(ash::switches::kAshDisableNewAudioHandler); @@ -188,16 +198,10 @@ bool UseNewAudioHandler() { bool ShowAudioDeviceMenu() { return ash::switches::UseNewAudioHandler() && - CommandLine::ForCurrentProcess()-> - HasSwitch(ash::switches::kAshEnableAudioDeviceMenu); -} - -bool UseAlternateShelfLayout() { - return CommandLine::ForCurrentProcess()-> - HasSwitch(ash::switches::kAshUseAlternateShelfLayout); + !CommandLine::ForCurrentProcess()-> + HasSwitch(ash::switches::kAshDisableAudioDeviceMenu); } -#if defined(OS_CHROMEOS) bool UseUsbChargerNotification() { return !CommandLine::ForCurrentProcess()-> HasSwitch(ash::switches::kAshDisableUsbChargerNotification); |