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

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

Issue 1921353002: Moves handful of files to ash/wm/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shell_ids
Patch Set: merge to trunk Created 4 years, 8 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/wm/window_cycle_list.cc ('k') | ash/wm/window_positioner_unittest.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/window_positioner.h" 5 #include "ash/wm/window_positioner.h"
6 6
7 #include "ash/wm/common/window_positioning_utils.h" 7 #include "ash/wm/common/window_positioning_utils.h"
8 #include "ash/wm/common/window_state.h"
8 #include "ash/wm/common/wm_globals.h" 9 #include "ash/wm/common/wm_globals.h"
9 #include "ash/wm/common/wm_screen_util.h" 10 #include "ash/wm/common/wm_screen_util.h"
10 #include "ash/wm/common/wm_window.h" 11 #include "ash/wm/common/wm_window.h"
11 #include "ash/wm/window_state.h"
12 #include "ui/compositor/layer.h" 12 #include "ui/compositor/layer.h"
13 #include "ui/gfx/geometry/insets.h" 13 #include "ui/gfx/geometry/insets.h"
14 #include "ui/gfx/screen.h" 14 #include "ui/gfx/screen.h"
15 15
16 namespace ash { 16 namespace ash {
17 17
18 const int WindowPositioner::kMinimumWindowOffset = 32; 18 const int WindowPositioner::kMinimumWindowOffset = 32;
19 19
20 // The number of pixels which are kept free top, left and right when a window 20 // The number of pixels which are kept free top, left and right when a window
21 // gets positioned to its default location. 21 // gets positioned to its default location.
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // If the alignment was pushing the window out of the screen, we ignore the 559 // If the alignment was pushing the window out of the screen, we ignore the
560 // alignment for that call. 560 // alignment for that call.
561 if (abs(pos.right() - work_area.right()) < grid) 561 if (abs(pos.right() - work_area.right()) < grid)
562 x = work_area.right() - w; 562 x = work_area.right() - w;
563 if (abs(pos.bottom() - work_area.bottom()) < grid) 563 if (abs(pos.bottom() - work_area.bottom()) < grid)
564 y = work_area.bottom() - h; 564 y = work_area.bottom() - h;
565 return gfx::Rect(x, y, w, h); 565 return gfx::Rect(x, y, w, h);
566 } 566 }
567 567
568 } // namespace ash 568 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_list.cc ('k') | ash/wm/window_positioner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698