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

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

Issue 10223014: Revert 133982 because it broke build on chromeos due to mid-air collision with 133961. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/wm/workspace/snap_sizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/snap_sizer.cc
===================================================================
--- ash/wm/workspace/snap_sizer.cc (revision 133983)
+++ ash/wm/workspace/snap_sizer.cc (working copy)
@@ -66,18 +66,6 @@
time_last_update_ = base::TimeTicks::Now();
}
-gfx::Rect SnapSizer::GetSnapBounds(const gfx::Rect& bounds) {
- size_t current;
- for (current = 0; current < arraysize(kPercents); ++current) {
- gfx::Rect target = GetTargetBoundsForPercent(current);
- if (target == bounds) {
- ++current;
- break;
- }
- }
- return GetTargetBoundsForPercent(current % arraysize(kPercents));
-}
-
int SnapSizer::CalculateIncrement(int x, int reference_x) const {
if (AlongEdge(x))
return 1;
@@ -106,16 +94,12 @@
}
gfx::Rect SnapSizer::GetTargetBounds() const {
- return GetTargetBoundsForPercent(percent_index_);
-}
-
-gfx::Rect SnapSizer::GetTargetBoundsForPercent(int percent_index) const {
gfx::Rect work_area(ScreenAsh::GetUnmaximizedWorkAreaBounds(window_));
int y = WindowResizer::AlignToGridRoundUp(work_area.y(), grid_size_);
// 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();
- int width = static_cast<float>(work_area.width()) * kPercents[percent_index];
+ int width = static_cast<float>(work_area.width()) * kPercents[percent_index_];
if (edge_ == LEFT_EDGE) {
int x = WindowResizer::AlignToGridRoundUp(work_area.x(), grid_size_);
int mid_x = WindowResizer::AlignToGridRoundUp(
« no previous file with comments | « ash/wm/workspace/snap_sizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698