Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1437)

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 1759213002: Enable swap primary accelerator only when possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix winbuild Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/accelerators/accelerator_controller.cc
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 955ba8e2352c314b3d85f4a53b3742379186a613..2ed2a555b62d8f2b3ef25517903b5d6713c25c0a 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -1050,8 +1050,9 @@ bool AcceleratorController::CanPerformAction(
case TOUCH_HUD_CLEAR:
case TOUCH_HUD_MODE_CHANGE:
return CanHandleTouchHud();
+ case SWAP_PRIMARY_DISPLAY:
+ return gfx::Screen::GetScreen()->GetNumDisplays() > 1;
#endif
-
case CYCLE_BACKWARD_MRU:
case CYCLE_FORWARD_MRU:
case EXIT:
@@ -1099,7 +1100,6 @@ bool AcceleratorController::CanPerformAction(
case OPEN_GET_HELP:
case POWER_PRESSED:
case POWER_RELEASED:
- case SWAP_PRIMARY_DISPLAY:
case TOGGLE_MIRROR_MODE:
case TOGGLE_SPOKEN_FEEDBACK:
case TOGGLE_WIFI:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698