| Index: ash/wm/window_cycle_controller.cc
|
| diff --git a/ash/wm/window_cycle_controller.cc b/ash/wm/window_cycle_controller.cc
|
| index f7f18c4594048c430a36c9d63d0684653934c672..23934e823f00c8f0e69b52010ef1df13159c879c 100644
|
| --- a/ash/wm/window_cycle_controller.cc
|
| +++ b/ash/wm/window_cycle_controller.cc
|
| @@ -14,6 +14,7 @@
|
| #include "ash/wm/window_cycle_event_filter.h"
|
| #include "ash/wm/window_cycle_list.h"
|
| #include "ash/wm/window_state.h"
|
| +#include "ash/wm/window_state_aura.h"
|
| #include "ash/wm_window.h"
|
| #include "base/metrics/histogram_macros.h"
|
|
|
| @@ -23,7 +24,7 @@ namespace {
|
|
|
| // Returns the most recently active window from the |window_list| or nullptr
|
| // if the list is empty.
|
| -WmWindow* GetActiveWindow(const MruWindowTracker::WindowList& window_list) {
|
| +aura::Window* GetActiveWindow(const WindowCycleList::WindowList& window_list) {
|
| return window_list.empty() ? nullptr : window_list[0];
|
| }
|
|
|
| @@ -55,8 +56,8 @@ void WindowCycleController::HandleCycleWindow(Direction direction) {
|
| }
|
|
|
| void WindowCycleController::StartCycling() {
|
| - MruWindowTracker::WindowList window_list =
|
| - Shell::Get()->mru_window_tracker()->BuildMruWindowList();
|
| + WindowCycleList::WindowList window_list = WmWindow::ToAuraWindows(
|
| + Shell::Get()->mru_window_tracker()->BuildMruWindowList());
|
| // Exclude windows:
|
| // - non user positionable windows, such as extension popups.
|
| // - windows being dragged
|
| @@ -66,11 +67,11 @@ void WindowCycleController::StartCycling() {
|
| // don't manually remove it, the window cycling UI won't crash or misbehave,
|
| // but there will be a flicker as the target window changes. Also exclude
|
| // unselectable windows such as extension popups.
|
| - auto window_is_ineligible = [](WmWindow* window) {
|
| - wm::WindowState* state = window->GetWindowState();
|
| + auto window_is_ineligible = [](aura::Window* window) {
|
| + wm::WindowState* state = wm::GetWindowState(window);
|
| return !state->IsUserPositionable() || state->is_dragged() ||
|
| window->GetRootWindow()
|
| - ->GetChildByShellWindowId(kShellWindowId_AppListContainer)
|
| + ->GetChildById(kShellWindowId_AppListContainer)
|
| ->Contains(window);
|
| };
|
| window_list.erase(std::remove_if(window_list.begin(), window_list.end(),
|
| @@ -109,8 +110,9 @@ void WindowCycleController::StopCycling() {
|
| window_cycle_list_->current_index() + 1);
|
| window_cycle_list_.reset();
|
|
|
| - WmWindow* active_window_after_window_cycle =
|
| - GetActiveWindow(Shell::Get()->mru_window_tracker()->BuildMruWindowList());
|
| + aura::Window* active_window_after_window_cycle =
|
| + GetActiveWindow(WmWindow::ToAuraWindows(
|
| + Shell::Get()->mru_window_tracker()->BuildMruWindowList()));
|
|
|
| // Remove our key event filter.
|
| event_filter_.reset();
|
|
|