| 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
|
|
|