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

Unified Diff: ash/wm/base_layout_manager.cc

Issue 138003007: [Cleanup] Screen cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make sure screen_for_shutdown is reset everytime Created 6 years, 11 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 55daac7b6df935dcc23d579e6b9d21839867a2d4..14f80d3281838df11d8c9638fd3195b9ddb9fa19 100644
--- a/ash/wm/base_layout_manager.cc
+++ b/ash/wm/base_layout_manager.cc
@@ -4,7 +4,7 @@
#include "ash/wm/base_layout_manager.h"
-#include "ash/screen_ash.h"
+#include "ash/screen_util.h"
#include "ash/session_state_delegate.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shell.h"
@@ -49,7 +49,7 @@ gfx::Rect BaseLayoutManager::BoundsWithScreenEdgeVisible(
aura::Window* window,
const gfx::Rect& restore_bounds) {
gfx::Rect max_bounds =
- ash::ScreenAsh::GetMaximizedWindowBoundsInParent(window);
+ ash::ScreenUtil::GetMaximizedWindowBoundsInParent(window);
// If the restore_bounds are more than 1 grid step away from the size the
// window would be when maximized, inset it.
max_bounds.Inset(ash::internal::WorkspaceWindowResizer::kScreenEdgeInset,
@@ -100,9 +100,9 @@ void BaseLayoutManager::SetChildBounds(aura::Window* child,
wm::WindowState* window_state = wm::GetWindowState(child);
// Some windows rely on this to set their initial bounds.
if (window_state->IsMaximized())
- child_bounds = ScreenAsh::GetMaximizedWindowBoundsInParent(child);
+ child_bounds = ScreenUtil::GetMaximizedWindowBoundsInParent(child);
else if (window_state->IsFullscreen())
- child_bounds = ScreenAsh::GetDisplayBoundsInParent(child);
+ child_bounds = ScreenUtil::GetDisplayBoundsInParent(child);
SetChildBoundsDirect(child, child_bounds);
}
@@ -221,14 +221,14 @@ void BaseLayoutManager::AdjustWindowBoundsForWorkAreaChange(
aura::Window* window = window_state->window();
if (window_state->IsMaximized()) {
SetChildBoundsDirect(
- window, ScreenAsh::GetMaximizedWindowBoundsInParent(window));
+ window, ScreenUtil::GetMaximizedWindowBoundsInParent(window));
} else if (window_state->IsFullscreen()) {
SetChildBoundsDirect(
- window, ScreenAsh::GetDisplayBoundsInParent(window));
+ window, ScreenUtil::GetDisplayBoundsInParent(window));
} else {
// The work area may be smaller than the full screen.
gfx::Rect display_rect =
- ScreenAsh::GetDisplayWorkAreaBoundsInParent(window);
+ ScreenUtil::GetDisplayWorkAreaBoundsInParent(window);
// Put as much of the window as possible within the display area.
gfx::Rect bounds = window->bounds();
bounds.AdjustToFit(display_rect);
@@ -263,14 +263,14 @@ void BaseLayoutManager::UpdateBoundsFromShowType(
case wm::SHOW_TYPE_MAXIMIZED:
SetChildBoundsDirect(
- window, ScreenAsh::GetMaximizedWindowBoundsInParent(window));
+ window, ScreenUtil::GetMaximizedWindowBoundsInParent(window));
break;
case wm::SHOW_TYPE_FULLSCREEN:
// Don't animate the full-screen window transition.
// TODO(jamescook): Use animation here. Be sure the lock screen works.
SetChildBoundsDirect(window,
- ScreenAsh::GetDisplayBoundsInParent(window));
+ ScreenUtil::GetDisplayBoundsInParent(window));
break;
case wm::SHOW_TYPE_MINIMIZED:
« 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