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

Unified Diff: ash/accelerators/accelerator_commands.cc

Issue 181563004: Remove --ash-disable-overview-mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Restore chromeactions.txt Created 6 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
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);
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller.cc » ('j') | ash/accelerators/accelerator_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698