| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/base_layout_manager.h" | 5 #include "ash/wm/base_layout_manager.h" |
| 6 | 6 |
| 7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/wm/shelf_layout_manager.h" | 9 #include "ash/wm/shelf_layout_manager.h" |
| 10 #include "ash/wm/window_animations.h" | 10 #include "ash/wm/window_animations.h" |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 217 SetChildBoundsDirect( | 217 SetChildBoundsDirect( |
| 218 window, ScreenAsh::GetMaximizedWindowBoundsInParent(window)); | 218 window, ScreenAsh::GetMaximizedWindowBoundsInParent(window)); |
| 219 } else if (wm::IsWindowFullscreen(window)) { | 219 } else if (wm::IsWindowFullscreen(window)) { |
| 220 SetChildBoundsDirect( | 220 SetChildBoundsDirect( |
| 221 window, ScreenAsh::GetDisplayBoundsInParent(window)); | 221 window, ScreenAsh::GetDisplayBoundsInParent(window)); |
| 222 } else { | 222 } else { |
| 223 // The work area may be smaller than the full screen. | 223 // The work area may be smaller than the full screen. |
| 224 gfx::Rect display_rect = | 224 gfx::Rect display_rect = |
| 225 ScreenAsh::GetDisplayWorkAreaBoundsInParent(window); | 225 ScreenAsh::GetDisplayWorkAreaBoundsInParent(window); |
| 226 // Put as much of the window as possible within the display area. | 226 // Put as much of the window as possible within the display area. |
| 227 window->SetBounds(window->bounds().AdjustToFit(display_rect)); | 227 gfx::Rect bounds = window->bounds(); |
| 228 bounds.AdjustToFit(display_rect); |
| 229 window->SetBounds(bounds); |
| 228 } | 230 } |
| 229 } | 231 } |
| 230 } | 232 } |
| 231 | 233 |
| 232 } // namespace internal | 234 } // namespace internal |
| 233 } // namespace ash | 235 } // namespace ash |
| OLD | NEW |