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

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

Issue 1890713002: Adds WmWindow and converts WindowState to use it (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge again 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/screen_util.h" 7 #include "ash/screen_util.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_delegate.h" 9 #include "ash/shell_delegate.h"
10 #include "ash/shell_window_ids.h" 10 #include "ash/shell_window_ids.h"
11 #include "ash/wm/mru_window_tracker.h" 11 #include "ash/wm/mru_window_tracker.h"
12 #include "ash/wm/window_resizer.h" 12 #include "ash/wm/window_resizer.h"
13 #include "ash/wm/window_state.h" 13 #include "ash/wm/window_state.h"
14 #include "ash/wm/window_state_aura.h"
14 #include "ash/wm/window_util.h" 15 #include "ash/wm/window_util.h"
15 #include "ui/aura/window.h" 16 #include "ui/aura/window.h"
16 #include "ui/aura/window_delegate.h" 17 #include "ui/aura/window_delegate.h"
17 #include "ui/aura/window_event_dispatcher.h" 18 #include "ui/aura/window_event_dispatcher.h"
18 #include "ui/compositor/layer.h" 19 #include "ui/compositor/layer.h"
19 #include "ui/compositor/scoped_layer_animation_settings.h" 20 #include "ui/compositor/scoped_layer_animation_settings.h"
20 #include "ui/gfx/screen.h" 21 #include "ui/gfx/screen.h"
21 #include "ui/wm/core/window_animations.h" 22 #include "ui/wm/core/window_animations.h"
22 #include "ui/wm/core/window_util.h" 23 #include "ui/wm/core/window_util.h"
23 24
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // If the alignment was pushing the window out of the screen, we ignore the 600 // If the alignment was pushing the window out of the screen, we ignore the
600 // alignment for that call. 601 // alignment for that call.
601 if (abs(pos.right() - work_area.right()) < grid) 602 if (abs(pos.right() - work_area.right()) < grid)
602 x = work_area.right() - w; 603 x = work_area.right() - w;
603 if (abs(pos.bottom() - work_area.bottom()) < grid) 604 if (abs(pos.bottom() - work_area.bottom()) < grid)
604 y = work_area.bottom() - h; 605 y = work_area.bottom() - h;
605 return gfx::Rect(x, y, w, h); 606 return gfx::Rect(x, y, w, h);
606 } 607 }
607 608
608 } // namespace ash 609 } // 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