Chromium Code Reviews| 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(); |
| + } |
|
oshima
2014/02/27 23:36:10
do we have to activate the top most window in mru?
flackr
2014/02/28 15:37:34
I'm actually not sure why we used the second windo
oshima
2014/02/28 17:54:39
Ah got it. Do we have a test for this scenario? If
flackr
2014/03/11 19:55:06
Test updated to check this case. Done.
|
| return true; |
| } |
| wm::WindowState* window_state = wm::GetWindowState(window); |