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

Unified Diff: ash/screen_ash.cc

Issue 10979090: Simplify WorkAreaBounds access logic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temp changes Created 8 years, 2 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 | « no previous file | ash/wm/shelf_layout_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/screen_ash.cc
diff --git a/ash/screen_ash.cc b/ash/screen_ash.cc
index efda02240d0849c533e6c4044d836a50d6bbb515..16c892d215d323e4f1a279dde97926d49c16376f 100644
--- a/ash/screen_ash.cc
+++ b/ash/screen_ash.cc
@@ -40,7 +40,7 @@ gfx::Display ScreenAsh::FindDisplayContainingPoint(const gfx::Point& point) {
// static
gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) {
if (window->GetRootWindow() == Shell::GetPrimaryRootWindow())
- return Shell::GetInstance()->shelf()->GetMaximizedWindowBounds(window);
+ return gfx::Screen::GetDisplayNearestWindow(window).work_area();
oshima 2012/10/15 04:45:04 GetDisplayWorkAreaBoundsInParent(window)
else
return GetDisplayBoundsInParent(window);
}
@@ -49,7 +49,7 @@ gfx::Rect ScreenAsh::GetMaximizedWindowBoundsInParent(aura::Window* window) {
gfx::Rect ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(
aura::Window* window) {
oshima 2012/10/15 04:45:04 Remove this method and replace with GetDisplayWork
if (window->GetRootWindow() == Shell::GetPrimaryRootWindow())
- return Shell::GetInstance()->shelf()->GetUnmaximizedWorkAreaBounds(window);
+ return gfx::Screen::GetDisplayNearestWindow(window).work_area();
else
return GetDisplayWorkAreaBoundsInParent(window);
}
« no previous file with comments | « no previous file | ash/wm/shelf_layout_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698