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 #ifndef ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_ | 5 #ifndef ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_ |
6 #define ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_ | 6 #define ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_ |
7 | 7 |
8 #include <utility> | 8 #include <utility> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ash/ash_export.h" | 11 #include "ash/ash_export.h" |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
14 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
15 #include "ui/gfx/rect.h" | 15 #include "ui/gfx/rect.h" |
16 | 16 |
17 namespace ash { | 17 namespace ash { |
18 namespace internal { | |
19 | 18 |
20 enum MagnetismEdge { | 19 enum MagnetismEdge { |
21 MAGNETISM_EDGE_TOP = 1 << 0, | 20 MAGNETISM_EDGE_TOP = 1 << 0, |
22 MAGNETISM_EDGE_LEFT = 1 << 1, | 21 MAGNETISM_EDGE_LEFT = 1 << 1, |
23 MAGNETISM_EDGE_BOTTOM = 1 << 2, | 22 MAGNETISM_EDGE_BOTTOM = 1 << 2, |
24 MAGNETISM_EDGE_RIGHT = 1 << 3, | 23 MAGNETISM_EDGE_RIGHT = 1 << 3, |
25 }; | 24 }; |
26 | 25 |
27 const uint32 kAllMagnetismEdges = | 26 const uint32 kAllMagnetismEdges = |
28 MAGNETISM_EDGE_TOP | MAGNETISM_EDGE_LEFT | MAGNETISM_EDGE_BOTTOM | | 27 MAGNETISM_EDGE_TOP | MAGNETISM_EDGE_LEFT | MAGNETISM_EDGE_BOTTOM | |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 SecondaryMagnetismEdge* secondary_edge) const; | 177 SecondaryMagnetismEdge* secondary_edge) const; |
179 | 178 |
180 // The edges to match against. | 179 // The edges to match against. |
181 const int32 edges_; | 180 const int32 edges_; |
182 | 181 |
183 ScopedVector<MagnetismEdgeMatcher> matchers_; | 182 ScopedVector<MagnetismEdgeMatcher> matchers_; |
184 | 183 |
185 DISALLOW_COPY_AND_ASSIGN(MagnetismMatcher); | 184 DISALLOW_COPY_AND_ASSIGN(MagnetismMatcher); |
186 }; | 185 }; |
187 | 186 |
188 } // namespace internal | |
189 } // namespace ash | 187 } // namespace ash |
190 | 188 |
191 #endif // ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_ | 189 #endif // ASH_WM_WORKSPACE_MAGNETISM_MATCHER_H_ |
OLD | NEW |