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

Unified Diff: ash/wm/fullscreen_window_finder.cc

Issue 2861243003: chromeos: Converts WorkspaceLayoutManager to aura::LayoutManager (Closed)
Patch Set: moar Created 3 years, 7 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698