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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 const gfx::Point& location, | 67 const gfx::Point& location, |
68 int window_component); | 68 int window_component); |
69 ~Details(); | 69 ~Details(); |
70 | 70 |
71 // The window we're resizing. | 71 // The window we're resizing. |
72 aura::Window* window; | 72 aura::Window* window; |
73 | 73 |
74 // Initial bounds of the window. | 74 // Initial bounds of the window. |
75 gfx::Rect initial_bounds; | 75 gfx::Rect initial_bounds; |
76 | 76 |
| 77 // Restore bounds (in screen coordinates) of the window before the drag |
| 78 // started. Only set if the window is normal and is being dragged. |
| 79 gfx::Rect restore_bounds; |
| 80 |
77 // Location passed to the constructor, in |window->parent()|'s coordinates. | 81 // Location passed to the constructor, in |window->parent()|'s coordinates. |
78 gfx::Point initial_location_in_parent; | 82 gfx::Point initial_location_in_parent; |
79 | 83 |
80 // Initial opacity of the window. | 84 // Initial opacity of the window. |
81 float initial_opacity; | 85 float initial_opacity; |
82 | 86 |
83 // The component the user pressed on. | 87 // The component the user pressed on. |
84 int window_component; | 88 int window_component; |
85 | 89 |
86 // Bitmask of the |kBoundsChange_| constants. | 90 // Bitmask of the |kBoundsChange_| constants. |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 // Returns the height of the drag. | 132 // Returns the height of the drag. |
129 static int GetHeightForDrag(const Details& details, | 133 static int GetHeightForDrag(const Details& details, |
130 int min_height, | 134 int min_height, |
131 int* delta_y, | 135 int* delta_y, |
132 int grid_size); | 136 int grid_size); |
133 }; | 137 }; |
134 | 138 |
135 } // namespace aura | 139 } // namespace aura |
136 | 140 |
137 #endif // ASH_WM_WINDOW_RESIZER_H_ | 141 #endif // ASH_WM_WINDOW_RESIZER_H_ |
OLD | NEW |