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

Side by Side Diff: ash/wm/base_layout_manager.cc

Issue 11110004: Make gfx::Rect class operations consistently mutate the class they are called on. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: cc/ fixes 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 unified diff | Download patch
« no previous file with comments | « ash/tooltips/tooltip_controller_unittest.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/tooltips/tooltip_controller_unittest.cc ('k') | ash/wm/partial_screenshot_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698