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

Unified Diff: ash/screen_ash.cc

Issue 11574041: Move WindowResizer to CoreWM. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years 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/ash.gyp ('k') | ash/wm/default_window_resizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « ash/ash.gyp ('k') | ash/wm/default_window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698