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

Unified Diff: ash/accelerators/accelerator_controller.cc

Issue 22667003: Reland "216874 - Use overview mode for alt-tab cycling." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix use after free in event handling. Created 7 years, 4 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 | ash/wm/window_selector.h » ('j') | 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 2a75415bea4b7d6c9bc61426614626c8e28046a4..3d669bbdcce694c2069138c34f58e72016b473f5 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -94,6 +94,12 @@ bool HandleCycleWindowMRU(WindowCycleController::Direction direction,
return true;
}
+bool HandleCycleWindowOverviewMRU(WindowSelector::Direction direction) {
+ Shell::GetInstance()->
+ window_selector_controller()->HandleCycleWindow(direction);
+ return true;
+}
+
void HandleCycleWindowLinear(CycleDirection direction) {
Shell::GetInstance()->
window_cycle_controller()->HandleLinearCycleWindow();
@@ -518,11 +524,19 @@ bool AcceleratorController::PerformAction(int action,
case CYCLE_BACKWARD_MRU:
if (key_code == ui::VKEY_TAB)
shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_PREVWINDOW_TAB);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableOverviewMode)) {
+ return HandleCycleWindowOverviewMRU(WindowSelector::BACKWARD);
+ }
return HandleCycleWindowMRU(WindowCycleController::BACKWARD,
accelerator.IsAltDown());
case CYCLE_FORWARD_MRU:
if (key_code == ui::VKEY_TAB)
shell->delegate()->RecordUserMetricsAction(UMA_ACCEL_NEXTWINDOW_TAB);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kAshEnableOverviewMode)) {
+ return HandleCycleWindowOverviewMRU(WindowSelector::FORWARD);
+ }
return HandleCycleWindowMRU(WindowCycleController::FORWARD,
accelerator.IsAltDown());
case CYCLE_BACKWARD_LINEAR:
« no previous file with comments | « no previous file | ash/wm/window_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698