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

Unified Diff: ash/wm/base_layout_manager.cc

Issue 10795013: Rename bounds accessors to be intuitive and consistent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « ash/wm/app_list_controller.cc ('k') | ash/wm/base_layout_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/base_layout_manager.cc
diff --git a/ash/wm/base_layout_manager.cc b/ash/wm/base_layout_manager.cc
index bb08389d0ee1e422f5f4e05f50e03b5a36380106..33f984bdbd451457527ef3a853b4196ecfc59c31 100644
--- a/ash/wm/base_layout_manager.cc
+++ b/ash/wm/base_layout_manager.cc
@@ -34,7 +34,7 @@ gfx::Rect BoundsWithScreenEdgeVisible(aura::Window* window,
// window would be when maximized, inset it.
int grid_size = ash::Shell::GetInstance()->GetGridSize();
gfx::Rect max_bounds =
- ash::ScreenAsh::GetMaximizedWindowParentBounds(window);
+ ash::ScreenAsh::GetMaximizedWindowBoundsInParent(window);
max_bounds.Inset(grid_size, grid_size);
if (restore_bounds.Contains(max_bounds))
return max_bounds;
@@ -104,9 +104,9 @@ void BaseLayoutManager::SetChildBounds(aura::Window* child,
gfx::Rect child_bounds(requested_bounds);
// Some windows rely on this to set their initial bounds.
if (wm::IsWindowMaximized(child))
- child_bounds = ScreenAsh::GetMaximizedWindowParentBounds(child);
+ child_bounds = ScreenAsh::GetMaximizedWindowBoundsInParent(child);
else if (wm::IsWindowFullscreen(child))
- child_bounds = ScreenAsh::GetDisplayParentBounds(child);
+ child_bounds = ScreenAsh::GetDisplayBoundsInParent(child);
SetChildBoundsDirect(child, child_bounds);
}
@@ -194,7 +194,7 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window,
SetRestoreBoundsIfNotSet(window);
MaybeAnimateToBounds(window,
animate,
- ScreenAsh::GetMaximizedWindowParentBounds(window));
+ ScreenAsh::GetMaximizedWindowBoundsInParent(window));
break;
case ui::SHOW_STATE_FULLSCREEN:
@@ -202,7 +202,7 @@ void BaseLayoutManager::UpdateBoundsFromShowState(aura::Window* window,
// Don't animate the full-screen window transition.
// TODO(jamescook): Use animation here. Be sure the lock screen works.
SetChildBoundsDirect(
- window, ScreenAsh::GetDisplayParentBounds(window));
+ window, ScreenAsh::GetDisplayBoundsInParent(window));
break;
default:
@@ -237,14 +237,14 @@ void BaseLayoutManager::AdjustWindowSizesForScreenChange() {
aura::Window* window = *it;
if (wm::IsWindowMaximized(window)) {
SetChildBoundsDirect(
- window, ScreenAsh::GetMaximizedWindowParentBounds(window));
+ window, ScreenAsh::GetMaximizedWindowBoundsInParent(window));
} else if (wm::IsWindowFullscreen(window)) {
SetChildBoundsDirect(
- window, ScreenAsh::GetDisplayParentBounds(window));
+ window, ScreenAsh::GetDisplayBoundsInParent(window));
} else {
// The work area may be smaller than the full screen.
gfx::Rect display_rect =
- ScreenAsh::GetDisplayWorkAreaParentBounds(window);
+ ScreenAsh::GetDisplayWorkAreaBoundsInParent(window);
// Put as much of the window as possible within the display area.
window->SetBounds(window->bounds().AdjustToFit(display_rect));
}
« no previous file with comments | « ash/wm/app_list_controller.cc ('k') | ash/wm/base_layout_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698