Index: ash/accelerators/accelerator_commands.cc |
diff --git a/ash/accelerators/accelerator_commands.cc b/ash/accelerators/accelerator_commands.cc |
index a4c8367dd64876db1ae323556fbefc341fb8eb4a..e7eb73a4cf83600439c8bf1f3aba4ce06d2cb51b 100644 |
--- a/ash/accelerators/accelerator_commands.cc |
+++ b/ash/accelerators/accelerator_commands.cc |
@@ -6,7 +6,7 @@ |
#include "ash/shell.h" |
#include "ash/shell_delegate.h" |
-#include "ash/wm/window_cycle_controller.h" |
+#include "ash/wm/mru_window_tracker.h" |
#include "ash/wm/window_state.h" |
#include "ash/wm/window_util.h" |
#include "base/metrics/user_metrics.h" |
@@ -19,8 +19,12 @@ bool ToggleMinimized() { |
// Attempt to restore the window that would be cycled through next from |
// the launcher when there is no active window. |
if (!window) { |
- ash::Shell::GetInstance()->window_cycle_controller()-> |
- HandleCycleWindow(WindowCycleController::FORWARD, false); |
+ MruWindowTracker::WindowList mru_windows( |
+ Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList()); |
+ if (!mru_windows.empty()) { |
+ wm::GetWindowState( |
+ mru_windows[mru_windows.size() > 1 ? 1 : 0])->Activate(); |
+ } |
return true; |
} |
wm::WindowState* window_state = wm::GetWindowState(window); |