OLD | NEW |
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/common/wm/workspace/magnetism_matcher.h" | 5 #include "ash/wm/workspace/magnetism_matcher.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
11 | 11 |
12 namespace ash { | 12 namespace ash { |
13 namespace { | 13 namespace { |
14 | 14 |
15 // Returns true if |a| is close enough to |b| that the two edges snap. | 15 // Returns true if |a| is close enough to |b| that the two edges snap. |
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 edges_) && | 186 edges_) && |
187 IsCloseEnough(bounds.right(), src_bounds.right())) { | 187 IsCloseEnough(bounds.right(), src_bounds.right())) { |
188 *secondary_edge = SECONDARY_MAGNETISM_EDGE_TRAILING; | 188 *secondary_edge = SECONDARY_MAGNETISM_EDGE_TRAILING; |
189 } else { | 189 } else { |
190 *secondary_edge = SECONDARY_MAGNETISM_EDGE_NONE; | 190 *secondary_edge = SECONDARY_MAGNETISM_EDGE_NONE; |
191 } | 191 } |
192 } | 192 } |
193 } | 193 } |
194 | 194 |
195 } // namespace ash | 195 } // namespace ash |
OLD | NEW |