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

Unified Diff: ash/wm/window_animations.cc

Issue 10221028: Move DIP translation from ui/aura to ui/compositor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable tests that doesn't run on bots Created 8 years, 7 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/shelf_layout_manager.cc ('k') | build/common.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_animations.cc
diff --git a/ash/wm/window_animations.cc b/ash/wm/window_animations.cc
index 15394ff5b85c3598ae4c2dc3b99b1b41710d674a..692af316e2df0c786c9fdd65978965213856c6b3 100644
--- a/ash/wm/window_animations.cc
+++ b/ash/wm/window_animations.cc
@@ -14,7 +14,6 @@
#include "base/stl_util.h"
#include "base/time.h"
#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/dip_util.h"
#include "ui/aura/window.h"
#include "ui/aura/window_observer.h"
#include "ui/aura/window_property.h"
@@ -236,7 +235,7 @@ void AnimateShowWindow_Drop(aura::Window* window) {
ui::Transform transform;
transform.ConcatScale(kWindowAnimation_ScaleFactor,
kWindowAnimation_ScaleFactor);
- gfx::Rect bounds = window->GetBoundsInPixel();
+ gfx::Rect bounds = window->bounds();
transform.ConcatTranslate(
kWindowAnimation_TranslateFactor * bounds.width(),
kWindowAnimation_TranslateFactor * bounds.height());
@@ -247,7 +246,7 @@ void AnimateHideWindow_Drop(aura::Window* window) {
ui::Transform transform;
transform.ConcatScale(kWindowAnimation_ScaleFactor,
kWindowAnimation_ScaleFactor);
- gfx::Rect bounds = window->GetBoundsInPixel();
+ gfx::Rect bounds = window->bounds();
transform.ConcatTranslate(
kWindowAnimation_TranslateFactor * bounds.width(),
kWindowAnimation_TranslateFactor * bounds.height());
@@ -281,8 +280,8 @@ void AnimateHideWindow_Fade(aura::Window* window) {
ui::Transform BuildWorkspaceSwitchTransform(aura::Window* window) {
// Animations for transitioning workspaces scale all windows. To give the
// effect of scaling from the center of the screen the windows are translated.
- gfx::Rect bounds = window->GetBoundsInPixel();
- gfx::Rect parent_bounds(window->parent()->GetBoundsInPixel());
+ gfx::Rect bounds = window->bounds();
+ gfx::Rect parent_bounds(window->parent()->bounds());
float mid_x = static_cast<float>(parent_bounds.width()) / 2.0f;
float initial_x =
@@ -366,9 +365,8 @@ gfx::Rect GetMinimizeRectForWindow(aura::Window* window) {
void AddLayerAnimationsForMinimize(aura::Window* window, bool show) {
// Recalculate the transform at restore time since the launcher item may have
// moved while the window was minimized.
- gfx::Rect bounds = window->GetBoundsInPixel();
- gfx::Rect target_bounds =
- aura::ConvertRectToPixel(window, GetMinimizeRectForWindow(window));
+ gfx::Rect bounds = window->bounds();
+ gfx::Rect target_bounds = GetMinimizeRectForWindow(window);
float scale_x = static_cast<float>(target_bounds.height()) / bounds.width();
float scale_y = static_cast<float>(target_bounds.width()) / bounds.height();
« no previous file with comments | « ash/wm/shelf_layout_manager.cc ('k') | build/common.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698