Index: ash/accelerators/accelerator_controller.cc |
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc |
index 91d21a6583e5195482be54adcf750cd3c499e425..e599f0cc7e637501547ba9d188654c08552f551a 100644 |
--- a/ash/accelerators/accelerator_controller.cc |
+++ b/ash/accelerators/accelerator_controller.cc |
@@ -25,6 +25,7 @@ |
#include "ash/root_window_controller.h" |
#include "ash/rotator/screen_rotation_animator.h" |
#include "ash/rotator/window_rotation.h" |
+#include "ash/screen_util.h" |
#include "ash/screenshot_delegate.h" |
#include "ash/session/session_state_delegate.h" |
#include "ash/shelf/shelf.h" |
@@ -75,6 +76,7 @@ |
#include "ui/views/controls/webview/webview.h" |
#if defined(OS_CHROMEOS) |
+#include "ash/display/display_configuration_controller.h" |
#include "ash/system/chromeos/keyboard_brightness_controller.h" |
#include "base/sys_info.h" |
#include "ui/base/ime/chromeos/ime_keyboard.h" |
@@ -635,7 +637,8 @@ void HandleSilenceSpokenFeedback() { |
void HandleSwapPrimaryDisplay() { |
base::RecordAction(UserMetricsAction("Accel_Swap_Primary_Display")); |
- Shell::GetInstance()->window_tree_host_manager()->SwapPrimaryDisplay(); |
+ Shell::GetInstance()->display_configuration_controller()->SetPrimaryDisplayId( |
+ ScreenUtil::GetSecondaryDisplay().id(), true /* user_action */); |
} |
bool CanHandleCycleUser() { |
@@ -684,7 +687,9 @@ void HandleToggleCapsLock() { |
void HandleToggleMirrorMode() { |
base::RecordAction(UserMetricsAction("Accel_Toggle_Mirror_Mode")); |
- Shell::GetInstance()->window_tree_host_manager()->ToggleMirrorMode(); |
+ bool mirror = !Shell::GetInstance()->display_manager()->IsInMirrorMode(); |
+ Shell::GetInstance()->display_configuration_controller()->SetMirrorMode( |
+ mirror, true /* user_action */); |
} |
void HandleToggleSpokenFeedback() { |