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

Side by Side Diff: ash/common/wm/workspace/magnetism_matcher.cc

Issue 2030593002: Renames ash/wm/common into ash/common/wm (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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
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/common/workspace/magnetism_matcher.h" 5 #include "ash/common/wm/workspace/magnetism_matcher.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 namespace ash { 10 namespace ash {
11 namespace { 11 namespace {
12 12
13 // Returns true if |a| is close enough to |b| that the two edges snap. 13 // Returns true if |a| is close enough to |b| that the two edges snap.
14 bool IsCloseEnough(int a, int b) { 14 bool IsCloseEnough(int a, int b) {
15 return abs(a - b) <= MagnetismMatcher::kMagneticDistance; 15 return abs(a - b) <= MagnetismMatcher::kMagneticDistance;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 edges_) && 178 edges_) &&
179 IsCloseEnough(bounds.right(), src_bounds.right())) { 179 IsCloseEnough(bounds.right(), src_bounds.right())) {
180 *secondary_edge = SECONDARY_MAGNETISM_EDGE_TRAILING; 180 *secondary_edge = SECONDARY_MAGNETISM_EDGE_TRAILING;
181 } else { 181 } else {
182 *secondary_edge = SECONDARY_MAGNETISM_EDGE_NONE; 182 *secondary_edge = SECONDARY_MAGNETISM_EDGE_NONE;
183 } 183 }
184 } 184 }
185 } 185 }
186 186
187 } // namespace ash 187 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/workspace/magnetism_matcher.h ('k') | ash/common/wm/workspace/multi_window_resize_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698