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

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

Issue 1900443002: Removes aura dependencies from WindowPositioner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke GetWorkAreaForWindowInParent and fix windows 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/window_positioning_utils.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 e04ded5f2d2c672616f00a07382c3cbf876ad5ca..b7c07124359e3a76ac1797e3bbc6f4dcc297ef69 100644
--- a/ash/wm/aura/wm_window_aura.cc
+++ b/ash/wm/aura/wm_window_aura.cc
@@ -5,6 +5,7 @@
#include "ash/wm/aura/wm_window_aura.h"
#include "ash/screen_util.h"
+#include "ash/wm/aura/wm_globals_aura.h"
#include "ash/wm/aura/wm_root_window_controller_aura.h"
#include "ash/wm/common/wm_window_observer.h"
#include "ash/wm/common/wm_window_property.h"
@@ -93,6 +94,10 @@ WmRootWindowController* WmWindowAura::GetRootWindowController() {
return root ? WmRootWindowControllerAura::Get(root) : nullptr;
}
+WmGlobals* WmWindowAura::GetGlobals() const {
+ return WmGlobalsAura::Get();
+}
+
int WmWindowAura::GetShellWindowId() {
return window_->id();
}
@@ -177,7 +182,7 @@ bool WmWindowAura::GetBoolProperty(WmWindowProperty key) {
return false;
}
-WindowState* WmWindowAura::GetWindowState() {
+const WindowState* WmWindowAura::GetWindowState() const {
return ash::wm::GetWindowState(window_);
}
@@ -193,10 +198,31 @@ WmWindow* WmWindowAura::GetTransientParent() {
return Get(::wm::GetTransientParent(window_));
}
+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;
+}
+
void WmWindowAura::SetBounds(const gfx::Rect& bounds) {
window_->SetBounds(bounds);
}
+void WmWindowAura::SetBoundsWithTransitionDelay(const gfx::Rect& bounds,
+ base::TimeDelta delta) {
+ if (::wm::WindowAnimationsDisabled(window_)) {
+ window_->SetBounds(bounds);
+ return;
+ }
+
+ ui::ScopedLayerAnimationSettings settings(window_->layer()->GetAnimator());
+ settings.SetTransitionDuration(delta);
+ window_->SetBounds(bounds);
+}
+
void WmWindowAura::SetBoundsDirect(const gfx::Rect& bounds) {
BoundsSetter().SetBounds(window_, bounds);
SnapWindowToPixelBoundary(window_);
« no previous file with comments | « ash/wm/aura/wm_window_aura.h ('k') | ash/wm/common/window_positioning_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698