Index: ash/screen_util.cc |
diff --git a/ash/screen_util.cc b/ash/screen_util.cc |
index 29baadf4b85ffc545fe525a6750cc27308ffc318..ea11d87db5ac453ddf449773257f708bac8948a5 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,18 @@ gfx::Rect ScreenUtil::GetMaximizedWindowBoundsInParent(aura::Window* window) { |
// static |
gfx::Rect ScreenUtil::GetDisplayBoundsInParent(aura::Window* window) { |
- return ConvertRectFromScreen( |
- window->parent(), |
- display::Screen::GetScreen()->GetDisplayNearestWindow(window).bounds()); |
+ gfx::Rect result = |
+ display::Screen::GetScreen()->GetDisplayNearestWindow(window).bounds(); |
+ ::wm::ConvertRectFromScreen(window->parent(), &result); |
+ return result; |
} |
// static |
gfx::Rect ScreenUtil::GetDisplayWorkAreaBoundsInParent(aura::Window* window) { |
- return ConvertRectFromScreen(window->parent(), |
- display::Screen::GetScreen() |
- ->GetDisplayNearestWindow(window) |
- .work_area()); |
+ gfx::Rect result = |
+ display::Screen::GetScreen()->GetDisplayNearestWindow(window).work_area(); |
+ ::wm::ConvertRectFromScreen(window->parent(), &result); |
+ return result; |
} |
-// 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 |