| Index: ash/accelerators/accelerator_controller.cc
|
| diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
|
| index dda4f2d15f4ebb37b6965994b23e5ffb0d8579e7..947daf06f393d8afcf04dd9992781d2466d269be 100644
|
| --- a/ash/accelerators/accelerator_controller.cc
|
| +++ b/ash/accelerators/accelerator_controller.cc
|
| @@ -53,6 +53,7 @@
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "ash/display/output_configurator_animation.h"
|
| +#include "base/chromeos/chromeos_version.h"
|
| #include "chromeos/display/output_configurator.h"
|
| #endif // defined(OS_CHROMEOS)
|
|
|
| @@ -105,7 +106,20 @@ bool HandleToggleSpokenFeedback() {
|
| Shell::GetInstance()->delegate()->ToggleSpokenFeedback();
|
| return true;
|
| }
|
| -#endif
|
| +void HandleCycleDisplayMode() {
|
| + Shell* shell = Shell::GetInstance();
|
| + if (!base::chromeos::IsRunningOnChromeOS()) {
|
| + internal::MultiDisplayManager::CycleDisplay();
|
| + } else if (shell->output_configurator()->connected_output_count() > 1) {
|
| + internal::OutputConfiguratorAnimation* animation =
|
| + shell->output_configurator_animation();
|
| + animation->StartFadeOutAnimation(base::Bind(
|
| + base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode),
|
| + base::Unretained(shell->output_configurator())));
|
| + }
|
| +}
|
| +
|
| +#endif // defined(OS_CHROMEOS)
|
|
|
| bool HandleExit() {
|
| ShellDelegate* delegate = Shell::GetInstance()->delegate();
|
| @@ -440,17 +454,9 @@ bool AcceleratorController::PerformAction(int action,
|
| if (Shell::GetInstance()->tray_delegate())
|
| Shell::GetInstance()->tray_delegate()->ToggleWifi();
|
| return true;
|
| - case CYCLE_DISPLAY_MODE: {
|
| - Shell* shell = Shell::GetInstance();
|
| - if (shell->output_configurator()->connected_output_count() > 1) {
|
| - internal::OutputConfiguratorAnimation* animation =
|
| - shell->output_configurator_animation();
|
| - animation->StartFadeOutAnimation(base::Bind(
|
| - base::IgnoreResult(&chromeos::OutputConfigurator::CycleDisplayMode),
|
| - base::Unretained(shell->output_configurator())));
|
| - return true;
|
| - }
|
| - }
|
| + case CYCLE_DISPLAY_MODE:
|
| + HandleCycleDisplayMode();
|
| + return true;
|
| #endif
|
| case OPEN_FEEDBACK_PAGE:
|
| ash::Shell::GetInstance()->delegate()->OpenFeedbackPage();
|
| @@ -666,12 +672,6 @@ bool AcceleratorController::PerformAction(int action,
|
| return HandleToggleDesktopBackgroundMode();
|
| case TOGGLE_ROOT_WINDOW_FULL_SCREEN:
|
| return HandleToggleRootWindowFullScreen();
|
| - case DISPLAY_ADD_REMOVE:
|
| - internal::MultiDisplayManager::AddRemoveDisplay();
|
| - return true;
|
| - case DISPLAY_CYCLE:
|
| - internal::MultiDisplayManager::CycleDisplay();
|
| - return true;
|
| case DISPLAY_TOGGLE_SCALE:
|
| internal::MultiDisplayManager::ToggleDisplayScale();
|
| return true;
|
|
|