Chromium Code Reviews| Index: ash/wm/fullscreen_window_finder.cc |
| diff --git a/ash/wm/fullscreen_window_finder.cc b/ash/wm/fullscreen_window_finder.cc |
| index 9d5d32e3bee4e6dbd999ce7a44d867a7365387a1..ee091de067baeb9a5e380d2ea93645c6de4a6010 100644 |
| --- a/ash/wm/fullscreen_window_finder.cc |
| +++ b/ash/wm/fullscreen_window_finder.cc |
| @@ -7,19 +7,21 @@ |
| #include "ash/public/cpp/shell_window_ids.h" |
| #include "ash/wm/switchable_windows.h" |
| #include "ash/wm/window_state.h" |
| +#include "ash/wm/window_state_aura.h" |
| #include "ash/wm/window_util.h" |
| -#include "ash/wm_window.h" |
| +#include "ui/aura/window.h" |
| #include "ui/compositor/layer.h" |
| +#include "ui/wm/core/window_util.h" |
| namespace ash { |
| namespace wm { |
| -WmWindow* GetWindowForFullscreenMode(WmWindow* context) { |
| - WmWindow* topmost_window = nullptr; |
| - WmWindow* active_window = WmWindow::Get(GetActiveWindow()); |
| +aura::Window* GetWindowForFullscreenMode(aura::Window* context) { |
| + aura::Window* topmost_window = nullptr; |
| + aura::Window* active_window = GetActiveWindow(); |
| if (active_window && |
| active_window->GetRootWindow() == context->GetRootWindow() && |
| - IsSwitchableContainer(active_window->GetParent())) { |
| + IsSwitchableContainer(active_window->parent())) { |
| // Use the active window when it is on the current root window to determine |
| // the fullscreen state to allow temporarily using a panel (which is always |
| // above the default container) while a fullscreen window is open. We only |
| @@ -29,22 +31,22 @@ WmWindow* GetWindowForFullscreenMode(WmWindow* context) { |
| } else { |
| // Otherwise, use the topmost window on the root window's default container |
| // when there is no active window on this root window. |
| - std::vector<WmWindow*> windows = |
| + const std::vector<aura::Window*>& windows = |
| context->GetRootWindow() |
| - ->GetChildByShellWindowId(kShellWindowId_DefaultContainer) |
| - ->GetChildren(); |
| + ->GetChildById(kShellWindowId_DefaultContainer) |
| + ->children(); |
| for (auto iter = windows.rbegin(); iter != windows.rend(); ++iter) { |
| - if ((*iter)->GetWindowState()->IsUserPositionable() && |
| - (*iter)->GetLayerTargetVisibility()) { |
| + if (GetWindowState((*iter))->IsUserPositionable() && |
|
msw
2017/05/05 23:48:06
nit: remove extra parens
sky
2017/05/08 15:16:37
Done.
|
| + (*iter)->layer()->GetTargetVisibility()) { |
| topmost_window = *iter; |
| break; |
| } |
| } |
| } |
| while (topmost_window) { |
| - if (topmost_window->GetWindowState()->IsFullscreen()) |
| + if (GetWindowState(topmost_window)->IsFullscreen()) |
| return topmost_window; |
| - topmost_window = topmost_window->GetTransientParent(); |
| + topmost_window = ::wm::GetTransientParent(topmost_window); |
| } |
| return nullptr; |
| } |