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

Unified Diff: ash/wm/aura/wm_window_aura.cc

Issue 1913473002: Makes WorkspaceWindowResizer use ash/wm/common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@root_controller_observer
Patch Set: fix exo again 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
« no previous file with comments | « ash/wm/aura/wm_window_aura.h ('k') | ash/wm/common/wm_globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/aura/wm_window_aura.cc
diff --git a/ash/wm/aura/wm_window_aura.cc b/ash/wm/aura/wm_window_aura.cc
index 8e73ea8cb0fa877e97688745acf5cdeed732a0e7..b4aab8042b977a5d4428ea472d93d493ec201179 100644
--- a/ash/wm/aura/wm_window_aura.cc
+++ b/ash/wm/aura/wm_window_aura.cc
@@ -89,6 +89,15 @@ WmWindow* WmWindowAura::Get(aura::Window* window) {
}
// static
+std::vector<WmWindow*> WmWindowAura::FromAuraWindows(
+ const std::vector<aura::Window*>& aura_windows) {
+ std::vector<WmWindow*> result(aura_windows.size());
+ for (size_t i = 0; i < aura_windows.size(); ++i)
+ result[i] = Get(aura_windows[i]);
+ return result;
+}
+
+// static
const aura::Window* WmWindowAura::GetAuraWindow(const WmWindow* wm_window) {
return static_cast<const WmWindowAura*>(wm_window)->aura_window();
}
@@ -217,12 +226,7 @@ const WmWindow* WmWindowAura::GetTransientParent() const {
}
std::vector<WmWindow*> WmWindowAura::GetTransientChildren() {
- const std::vector<aura::Window*> aura_windows(
- ::wm::GetTransientChildren(window_));
- std::vector<WmWindow*> wm_windows(aura_windows.size());
- for (size_t i = 0; i < aura_windows.size(); ++i)
- wm_windows[i] = Get(aura_windows[i]);
- return wm_windows;
+ return FromAuraWindows(::wm::GetTransientChildren(window_));
}
void WmWindowAura::SetLayoutManager(
@@ -462,11 +466,7 @@ void WmWindowAura::Unminimize() {
}
std::vector<WmWindow*> WmWindowAura::GetChildren() {
- const std::vector<aura::Window*>& aura_children = window_->children();
- std::vector<WmWindow*> result(aura_children.size());
- for (size_t i = 0; i < aura_children.size(); ++i)
- result[i] = Get(aura_children[i]);
- return result;
+ return FromAuraWindows(window_->children());
}
WmWindow* WmWindowAura::GetChildByShellWindowId(int id) {
« no previous file with comments | « ash/wm/aura/wm_window_aura.h ('k') | ash/wm/common/wm_globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698