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

Unified Diff: ash/wm/stacking_controller.cc

Issue 1923983003: Makes WorkspaceLayoutManager use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix always-on-top and remove mus changes Created 4 years, 8 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/stacking_controller.cc
diff --git a/ash/wm/stacking_controller.cc b/ash/wm/stacking_controller.cc
index 9082da69abcbe236b91e70124b09f9c2efc870b2..dd19e6cf85133560c78dbac0b7b9b94b3b99988f 100644
--- a/ash/wm/stacking_controller.cc
+++ b/ash/wm/stacking_controller.cc
@@ -50,6 +50,13 @@ AlwaysOnTopController* GetAlwaysOnTopController(aura::Window* root_window) {
return GetRootWindowController(root_window)->always_on_top_controller();
}
+aura::Window* GetContainerFromAlwaysOnTopController(aura::Window* root,
+ aura::Window* window) {
+ return wm::WmWindowAura::GetAuraWindow(
+ GetAlwaysOnTopController(root)->GetContainer(
+ wm::WmWindowAura::Get(window)));
+}
+
} // namespace
////////////////////////////////////////////////////////////////////////////////
@@ -84,7 +91,7 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* context,
else if (HasTransientParentWindow(window))
return RootWindowController::GetContainerForWindow(
::wm::GetTransientParent(window));
- return GetAlwaysOnTopController(target_root)->GetContainer(window);
+ return GetContainerFromAlwaysOnTopController(target_root, window);
case ui::wm::WINDOW_TYPE_CONTROL:
return GetContainerById(target_root,
kShellWindowId_UnparentedControlContainer);
@@ -92,7 +99,7 @@ aura::Window* StackingController::GetDefaultParent(aura::Window* context,
if (wm::GetWindowState(window)->panel_attached())
return GetContainerById(target_root, kShellWindowId_PanelContainer);
else
- return GetAlwaysOnTopController(target_root)->GetContainer(window);
+ return GetContainerFromAlwaysOnTopController(target_root, window);
case ui::wm::WINDOW_TYPE_MENU:
return GetContainerById(target_root, kShellWindowId_MenuContainer);
case ui::wm::WINDOW_TYPE_TOOLTIP:

Powered by Google App Engine
This is Rietveld 408576698