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

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: Comments. 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
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/shell.h » ('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..eea4aed6cd439f74c668c58f7ae68faa82afe37e 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[mru_windows.size() > 1 ? 1 : 0]);
+ wm::GetWindowState(window)->Activate();
oshima 2014/02/28 17:54:39 So this case, we're activating the top most (if th
flackr 2014/03/11 19:55:07 Looking into this we only ever expect to cycle foc
views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
if (!widget)
break;
« no previous file with comments | « ash/extended_desktop_unittest.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698