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

Unified Diff: ash/focus_cycler.cc

Issue 181563004: Remove --ash-disable-overview-mode (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with master. Created 6 years, 9 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 | « ash/extended_desktop_unittest.cc ('k') | ash/focus_cycler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/focus_cycler.cc
diff --git a/ash/focus_cycler.cc b/ash/focus_cycler.cc
index c83db87b134cdc2a3f335f6caae00cf525172064..efd958cabc8491c6f0376c4cf120fa7f24d13544 100644
--- a/ash/focus_cycler.cc
+++ b/ash/focus_cycler.cc
@@ -6,7 +6,7 @@
#include "ash/shell.h"
#include "ash/wm/mru_window_tracker.h"
-#include "ash/wm/window_cycle_controller.h"
+#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
#include "ui/aura/client/activation_client.h"
#include "ui/aura/window.h"
@@ -77,13 +77,12 @@ void FocusCycler::RotateFocus(Direction direction) {
if (index == browser_index) {
// Activate the most recently active browser window.
- ash::Shell::GetInstance()->window_cycle_controller()->HandleCycleWindow(
- WindowCycleController::FORWARD, false);
-
- // Rotate pane focus within that window.
- aura::Window* window = ash::wm::GetActiveWindow();
- if (!window)
+ MruWindowTracker::WindowList mru_windows(
+ Shell::GetInstance()->mru_window_tracker()->BuildMruWindowList());
+ if (mru_windows.empty())
break;
+ aura::Window* window = mru_windows.front();
+ wm::GetWindowState(window)->Activate();
views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
if (!widget)
break;
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/focus_cycler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698