Index: ash/screen_ash.cc |
=================================================================== |
--- ash/screen_ash.cc (revision 173169) |
+++ ash/screen_ash.cc (working copy) |
@@ -17,6 +17,7 @@ |
#include "ui/aura/root_window.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/screen.h" |
+#include "ui/views/corewm/screen_util.h" |
namespace ash { |
@@ -54,27 +55,19 @@ |
// static |
gfx::Rect ScreenAsh::GetDisplayWorkAreaBoundsInParent(aura::Window* window) { |
- return ConvertRectFromScreen( |
- window->parent(), |
- Shell::GetScreen()->GetDisplayNearestWindow(window).work_area()); |
+ return views::corewm::GetDisplayWorkAreaBoundsInParent(window); |
} |
// static |
gfx::Rect ScreenAsh::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()); |
+ return views::corewm::ConvertRectToScreen(window, rect); |
} |
// static |
gfx::Rect ScreenAsh::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()); |
+ return views::corewm::ConvertRectFromScreen(window, rect); |
} |
// static |