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

Unified Diff: ash/wm/workspace/snap_sizer.cc

Issue 10910164: Removes the grid from ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ShelfBrowserTest Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/workspace/snap_sizer.h ('k') | ash/wm/workspace/workspace2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/snap_sizer.cc
diff --git a/ash/wm/workspace/snap_sizer.cc b/ash/wm/workspace/snap_sizer.cc
index e844bcbab16156e4488113700c14b028dd1bb6e6..06a80e900936644f0f3e71190227b984773b74bd 100644
--- a/ash/wm/workspace/snap_sizer.cc
+++ b/ash/wm/workspace/snap_sizer.cc
@@ -38,11 +38,9 @@ const int kMinimumScreenPercent = 90;
SnapSizer::SnapSizer(aura::Window* window,
const gfx::Point& start,
- Edge edge,
- int grid_size)
+ Edge edge)
: window_(window),
edge_(edge),
- grid_size_(grid_size),
time_last_update_(base::TimeTicks::Now()),
size_index_(0),
resize_disabled_(false),
@@ -93,7 +91,7 @@ void SnapSizer::SelectDefaultSizeAndDisableResize() {
gfx::Rect SnapSizer::GetTargetBoundsForSize(size_t size_index) const {
gfx::Rect work_area(ScreenAsh::GetUnmaximizedWorkAreaBoundsInParent(window_));
- int y = WindowResizer::AlignToGridRoundUp(work_area.y(), grid_size_);
+ int y = work_area.y();
// We don't align to the bottom of the grid as the launcher may not
// necessarily align to the grid (happens when auto-hidden).
int max_y = work_area.bottom();
@@ -113,14 +111,12 @@ gfx::Rect SnapSizer::GetTargetBoundsForSize(size_t size_index) const {
width = std::min(width, kMinimumScreenPercent * work_area.width() / 100);
if (edge_ == LEFT_EDGE) {
- int x = WindowResizer::AlignToGridRoundUp(work_area.x(), grid_size_);
- int mid_x = WindowResizer::AlignToGridRoundUp(
- work_area.x() + width, grid_size_);
+ int x = work_area.x();
+ int mid_x = x + width;
return gfx::Rect(x, y, mid_x - x, max_y - y);
}
- int max_x =
- WindowResizer::AlignToGridRoundDown(work_area.right(), grid_size_);
- int x = WindowResizer::AlignToGridRoundUp(max_x - width, grid_size_);
+ int max_x = work_area.right();
+ int x = max_x - width;
return gfx::Rect(x , y, max_x - x, max_y - y);
}
« no previous file with comments | « ash/wm/workspace/snap_sizer.h ('k') | ash/wm/workspace/workspace2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698