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_WINDOW_RESIZER_H_ | 5 #ifndef ASH_WM_WINDOW_RESIZER_H_ |
6 #define ASH_WM_WINDOW_RESIZER_H_ | 6 #define ASH_WM_WINDOW_RESIZER_H_ |
7 | 7 |
8 #include "ash/ash_export.h" | 8 #include "ash/ash_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "ui/gfx/rect.h" | 10 #include "ui/gfx/rect.h" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 | 85 |
86 // Bitmask of the |kBoundsChangeDirection_| constants. | 86 // Bitmask of the |kBoundsChangeDirection_| constants. |
87 int size_change_direction; | 87 int size_change_direction; |
88 | 88 |
89 // Will the drag actually modify the window? | 89 // Will the drag actually modify the window? |
90 bool is_resizable; | 90 bool is_resizable; |
91 }; | 91 }; |
92 | 92 |
93 static gfx::Rect CalculateBoundsForDrag( | 93 static gfx::Rect CalculateBoundsForDrag( |
94 const Details& details, | 94 const Details& details, |
95 const gfx::Point& location, | 95 const gfx::Point& location_in_screen, |
96 int grid_size); | 96 int grid_size); |
97 | 97 |
98 static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds, | 98 static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds, |
99 int grid_size); | 99 int grid_size); |
100 | 100 |
101 static bool IsBottomEdge(int component); | 101 static bool IsBottomEdge(int component); |
102 | 102 |
103 private: | 103 private: |
104 // Returns the new origin of the window. The arguments are the difference | 104 // Returns the new origin of the window. The arguments are the difference |
105 // between the current location and the initial location. | 105 // between the current location and the initial location. |
(...skipping 16 matching lines...) Expand all Loading... |
122 // Returns the height of the drag. | 122 // Returns the height of the drag. |
123 static int GetHeightForDrag(const Details& details, | 123 static int GetHeightForDrag(const Details& details, |
124 int min_height, | 124 int min_height, |
125 int* delta_y, | 125 int* delta_y, |
126 int grid_size); | 126 int grid_size); |
127 }; | 127 }; |
128 | 128 |
129 } // namespace aura | 129 } // namespace aura |
130 | 130 |
131 #endif // ASH_WM_WINDOW_RESIZER_H_ | 131 #endif // ASH_WM_WINDOW_RESIZER_H_ |
OLD | NEW |