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

Unified Diff: ash/common/wm/container_finder.cc

Issue 2336653002: Ports SystemModalContainerLayoutManager to ash/common (Closed)
Patch Set: merge again Created 4 years, 3 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
« no previous file with comments | « ash/common/wm/container_finder.h ('k') | ash/common/wm/system_modal_container_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/container_finder.cc
diff --git a/ash/common/wm/container_finder.cc b/ash/common/wm/container_finder.cc
index 1d954287525f490dbe6166ffbbe84a3ee8f4fbfa..3c21b2622a18d45032f55e3a67c7c6d8c69ddc06 100644
--- a/ash/common/wm/container_finder.cc
+++ b/ash/common/wm/container_finder.cc
@@ -108,5 +108,22 @@ WmWindow* GetDefaultParent(WmWindow* context,
return nullptr;
}
+std::vector<WmWindow*> GetContainersFromAllRootWindows(
+ int container_id,
+ WmWindow* priority_root) {
+ std::vector<WmWindow*> containers;
+ for (WmWindow* root : WmShell::Get()->GetAllRootWindows()) {
+ WmWindow* container = root->GetChildByShellWindowId(container_id);
+ if (!container)
+ continue;
+
+ if (priority_root && priority_root->Contains(container))
+ containers.insert(containers.begin(), container);
+ else
+ containers.push_back(container);
+ }
+ return containers;
+}
+
} // namespace wm
} // namespace ash
« no previous file with comments | « ash/common/wm/container_finder.h ('k') | ash/common/wm/system_modal_container_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698