| 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();
|
| views::Widget* widget = views::Widget::GetWidgetForNativeWindow(window);
|
| if (!widget)
|
| break;
|
|
|