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

Unified Diff: ash/screen_util.cc

Issue 2660873002: Move two utility functions from ash/screen_util.h to ui/wm/core/coordinate_conversion.h (Closed)
Patch Set: Created 3 years, 11 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
Index: ash/screen_util.cc
diff --git a/ash/screen_util.cc b/ash/screen_util.cc
index 29baadf4b85ffc545fe525a6750cc27308ffc318..098a98e803e52f72dbd786236fb2c2d8303243bd 100644
--- a/ash/screen_util.cc
+++ b/ash/screen_util.cc
@@ -14,6 +14,7 @@
#include "ui/display/manager/display_manager.h"
#include "ui/display/screen.h"
#include "ui/gfx/geometry/size_conversions.h"
+#include "ui/wm/core/coordinate_conversion.h"
namespace ash {
@@ -28,37 +29,17 @@ gfx::Rect ScreenUtil::GetMaximizedWindowBoundsInParent(aura::Window* window) {
// static
gfx::Rect ScreenUtil::GetDisplayBoundsInParent(aura::Window* window) {
- return ConvertRectFromScreen(
+ return ::wm::ConvertRectFromScreen(
window->parent(),
display::Screen::GetScreen()->GetDisplayNearestWindow(window).bounds());
}
// static
gfx::Rect ScreenUtil::GetDisplayWorkAreaBoundsInParent(aura::Window* window) {
- return ConvertRectFromScreen(window->parent(),
- display::Screen::GetScreen()
- ->GetDisplayNearestWindow(window)
- .work_area());
+ return ::wm::ConvertRectFromScreen(window->parent(),
+ display::Screen::GetScreen()
+ ->GetDisplayNearestWindow(window)
+ .work_area());
}
-// static
-gfx::Rect ScreenUtil::ConvertRectToScreen(aura::Window* window,
- const gfx::Rect& rect) {
- gfx::Point point = rect.origin();
- aura::client::GetScreenPositionClient(window->GetRootWindow())
- ->ConvertPointToScreen(window, &point);
- return gfx::Rect(point, rect.size());
-}
-
-// static
-gfx::Rect ScreenUtil::ConvertRectFromScreen(aura::Window* window,
- const gfx::Rect& rect) {
- gfx::Point point = rect.origin();
- aura::client::GetScreenPositionClient(window->GetRootWindow())
- ->ConvertPointFromScreen(window, &point);
- return gfx::Rect(point, rect.size());
-}
-
-// static
-
} // namespace ash

Powered by Google App Engine
This is Rietveld 408576698