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 12 matching lines...) Expand all Loading... |
23 // Constants to identify the type of resize. | 23 // Constants to identify the type of resize. |
24 static const int kBoundsChange_None; | 24 static const int kBoundsChange_None; |
25 static const int kBoundsChange_Repositions; | 25 static const int kBoundsChange_Repositions; |
26 static const int kBoundsChange_Resizes; | 26 static const int kBoundsChange_Resizes; |
27 | 27 |
28 // Used to indicate which direction the resize occurs in. | 28 // Used to indicate which direction the resize occurs in. |
29 static const int kBoundsChangeDirection_None; | 29 static const int kBoundsChangeDirection_None; |
30 static const int kBoundsChangeDirection_Horizontal; | 30 static const int kBoundsChangeDirection_Horizontal; |
31 static const int kBoundsChangeDirection_Vertical; | 31 static const int kBoundsChangeDirection_Vertical; |
32 | 32 |
| 33 // Upon user resizing, at least this many pixels should remain visible on the |
| 34 // screen to avoid 'loosing' the window. |
| 35 static const int kMinimumOnScreenSize; |
| 36 |
33 WindowResizer(); | 37 WindowResizer(); |
34 virtual ~WindowResizer(); | 38 virtual ~WindowResizer(); |
35 | 39 |
36 // Returns a bitmask of the kBoundsChange_ values. | 40 // Returns a bitmask of the kBoundsChange_ values. |
37 static int GetBoundsChangeForWindowComponent(int component); | 41 static int GetBoundsChangeForWindowComponent(int component); |
38 | 42 |
39 // Invoked to drag/move/resize the window. |location| is in the coordinates | 43 // Invoked to drag/move/resize the window. |location| is in the coordinates |
40 // of the window supplied to the constructor. |event_flags| is the event | 44 // of the window supplied to the constructor. |event_flags| is the event |
41 // flags from the event. | 45 // flags from the event. |
42 virtual void Drag(const gfx::Point& location, int event_flags) = 0; | 46 virtual void Drag(const gfx::Point& location, int event_flags) = 0; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 | 121 |
118 // Returns the height of the drag. | 122 // Returns the height of the drag. |
119 static int GetHeightForDrag(const Details& details, | 123 static int GetHeightForDrag(const Details& details, |
120 int min_height, | 124 int min_height, |
121 int* delta_y); | 125 int* delta_y); |
122 }; | 126 }; |
123 | 127 |
124 } // namespace aura | 128 } // namespace aura |
125 | 129 |
126 #endif // ASH_WM_WINDOW_RESIZER_H_ | 130 #endif // ASH_WM_WINDOW_RESIZER_H_ |
OLD | NEW |