Skip to content

Commit

Permalink
Enable ash tray audio device selection menu by default.
Browse files Browse the repository at this point in the history
BUG=259989
TBR=jamescook@chromium.org

Review URL: https://codereview.chromium.org/18470005

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@211846 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
jennyz@chromium.org committed Jul 16, 2013
1 parent a5f3bbd commit d7969d7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 16 deletions.
30 changes: 17 additions & 13 deletions ash/ash_switches.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand All @@ -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";
Expand All @@ -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";

Expand Down Expand Up @@ -181,23 +185,23 @@ 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);
}

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);
Expand Down
6 changes: 5 additions & 1 deletion ash/ash_switches.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ ASH_EXPORT extern const char kAshDefaultGuestWallpaperLarge[];
ASH_EXPORT extern const char kAshDefaultGuestWallpaperSmall[];
ASH_EXPORT extern const char kAshDefaultWallpaperLarge[];
ASH_EXPORT extern const char kAshDefaultWallpaperSmall[];
#if defined(OS_CHROMEOS)
ASH_EXPORT extern const char kAshDisableAudioDeviceMenu[];
#endif
ASH_EXPORT extern const char kAshDisableAutoMaximizing[];
ASH_EXPORT extern const char kAshDisableAutoWindowPlacement[];
ASH_EXPORT extern const char kAshDisableDisplayChangeLimiter[];
ASH_EXPORT extern const char kAshDisableImmersiveFullscreen[];
#if defined(OS_CHROMEOS)
ASH_EXPORT extern const char kAshDisableNewAudioHandler[];
#endif
ASH_EXPORT extern const char kAshDisableNewLockAnimations[];
ASH_EXPORT extern const char kAshDisablePerAppLauncher[];
ASH_EXPORT extern const char kAshDisableUIScaling[];
Expand All @@ -40,7 +45,6 @@ ASH_EXPORT extern const char kAshDisableDragAndDropAppListToLauncher[];
ASH_EXPORT extern const char kAshDisableSoftwareMirroring[];
ASH_EXPORT extern const char kAshDisableUsbChargerNotification[];
#endif
ASH_EXPORT extern const char kAshEnableAudioDeviceMenu[];
ASH_EXPORT extern const char kAshEnableAdvancedGestures[];
ASH_EXPORT extern const char kAshEnableBrightnessControl[];
ASH_EXPORT extern const char kAshEnableDockedWindows[];
Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/about_flags.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1227,7 +1227,7 @@ const Experiment kExperiments[] = {
IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_NAME,
IDS_FLAGS_ASH_AUDIO_DEVICE_MENU_DESCRIPTION,
kOsCrOS,
SINGLE_VALUE_TYPE(ash::switches::kAshEnableAudioDeviceMenu)
ENABLE_DISABLE_VALUE_TYPE("", ash::switches::kAshDisableAudioDeviceMenu)
},
{
"enable-carrier-switching",
Expand Down
4 changes: 3 additions & 1 deletion chrome/browser/chromeos/login/chrome_restart_request.cc
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,10 @@ std::string DeriveCommandLine(const GURL& start_url,
ash::switches::kAshDefaultGuestWallpaperSmall,
ash::switches::kAshDefaultWallpaperLarge,
ash::switches::kAshDefaultWallpaperSmall,
#if defined(OS_CHROMEOS)
ash::switches::kAshDisableAudioDeviceMenu,
ash::switches::kAshDisableNewAudioHandler,
ash::switches::kAshEnableAudioDeviceMenu,
#endif
ash::switches::kAshHostWindowBounds,
ash::switches::kAshTouchHud,
ash::switches::kAuraLegacyPowerButton,
Expand Down

0 comments on commit d7969d7

Please sign in to comment.