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

Side by Side Diff: ash/wm/workspace/snap_sizer.cc

Issue 10675011: Rename the remaining usage of Monitor to Display (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sync Created 8 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace_manager.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/workspace/snap_sizer.h" 5 #include "ash/wm/workspace/snap_sizer.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "ash/screen_ash.h" 9 #include "ash/screen_ash.h"
10 #include "ash/wm/window_resizer.h" 10 #include "ash/wm/window_resizer.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 work_area.x() + width, grid_size_); 122 work_area.x() + width, grid_size_);
123 return gfx::Rect(x, y, mid_x - x, max_y - y); 123 return gfx::Rect(x, y, mid_x - x, max_y - y);
124 } 124 }
125 int max_x = 125 int max_x =
126 WindowResizer::AlignToGridRoundDown(work_area.right(), grid_size_); 126 WindowResizer::AlignToGridRoundDown(work_area.right(), grid_size_);
127 int x = WindowResizer::AlignToGridRoundUp(max_x - width, grid_size_); 127 int x = WindowResizer::AlignToGridRoundUp(max_x - width, grid_size_);
128 return gfx::Rect(x , y, max_x - x, max_y - y); 128 return gfx::Rect(x , y, max_x - x, max_y - y);
129 } 129 }
130 130
131 bool SnapSizer::AlongEdge(int x) const { 131 bool SnapSizer::AlongEdge(int x) const {
132 // TODO: need to support multi-monitor. 132 // TODO: need to support multi-display.
133 gfx::Rect area(gfx::Screen::GetDisplayNearestWindow(window_).bounds()); 133 gfx::Rect area(gfx::Screen::GetDisplayNearestWindow(window_).bounds());
134 return (x <= area.x()) || (x >= area.right() - 1); 134 return (x <= area.x()) || (x >= area.right() - 1);
135 } 135 }
136 136
137 } // namespace internal 137 } // namespace internal
138 } // namespace ash 138 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698