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

Unified Diff: ash/wm/overview/window_selector_unittest.cc

Issue 2660873002: Move two utility functions from ash/screen_util.h to ui/wm/core/coordinate_conversion.h (Closed)
Patch Set: rebase Created 3 years, 10 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/drag_window_resizer.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index d3cc05a80b6e7dbb0bfe25cd254c835b075d984a..61f5d17b64f526cb85507f2f2474a43593424394 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -31,7 +31,6 @@
#include "ash/drag_drop/drag_drop_controller.h"
#include "ash/public/cpp/shell_window_ids.h"
#include "ash/root_window_controller.h"
-#include "ash/screen_util.h"
#include "ash/shell.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/shelf_view_test_api.h"
@@ -71,6 +70,7 @@
#include "ui/views/controls/label.h"
#include "ui/views/widget/native_widget_aura.h"
#include "ui/views/widget/widget_delegate.h"
+#include "ui/wm/core/coordinate_conversion.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/activation_delegate.h"
@@ -199,8 +199,9 @@ class WindowSelectorTest : public test::AshTestBase {
}
gfx::Rect GetTransformedBounds(aura::Window* window) {
- gfx::RectF bounds(ScreenUtil::ConvertRectToScreen(
- window->parent(), window->layer()->bounds()));
+ gfx::Rect bounds_in_screen = window->layer()->bounds();
+ ::wm::ConvertRectToScreen(window->parent(), &bounds_in_screen);
+ gfx::RectF bounds(bounds_in_screen);
gfx::Transform transform(gfx::TransformAboutPivot(
gfx::ToFlooredPoint(bounds.origin()), window->layer()->transform()));
transform.TransformRect(&bounds);
@@ -208,8 +209,9 @@ class WindowSelectorTest : public test::AshTestBase {
}
gfx::Rect GetTransformedTargetBounds(aura::Window* window) {
- gfx::RectF bounds(ScreenUtil::ConvertRectToScreen(
- window->parent(), window->layer()->GetTargetBounds()));
+ gfx::Rect bounds_in_screen = window->layer()->GetTargetBounds();
+ ::wm::ConvertRectToScreen(window->parent(), &bounds_in_screen);
+ gfx::RectF bounds(bounds_in_screen);
gfx::Transform transform(
gfx::TransformAboutPivot(gfx::ToFlooredPoint(bounds.origin()),
window->layer()->GetTargetTransform()));
« no previous file with comments | « ash/wm/drag_window_resizer.cc ('k') | ash/wm/window_animations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698