| 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 29 matching lines...) Expand all Loading... |
| 40 // |grid_size|. | 40 // |grid_size|. |
| 41 static int AlignToGrid(int location, int grid_size); | 41 static int AlignToGrid(int location, int grid_size); |
| 42 | 42 |
| 43 // Variant of AlignToGrid that rounds up. | 43 // Variant of AlignToGrid that rounds up. |
| 44 static int AlignToGridRoundUp(int location, int grid_size); | 44 static int AlignToGridRoundUp(int location, int grid_size); |
| 45 | 45 |
| 46 // Variant of AlignToGrid that rounds down. | 46 // Variant of AlignToGrid that rounds down. |
| 47 static int AlignToGridRoundDown(int location, int grid_size); | 47 static int AlignToGridRoundDown(int location, int grid_size); |
| 48 | 48 |
| 49 // Invoked to drag/move/resize the window. |location| is in the coordinates | 49 // Invoked to drag/move/resize the window. |location| is in the coordinates |
| 50 // of the window supplied to the constructor. |event_flags| is the event | 50 // of the screen. |event_flags| is the event flags from the event. |
| 51 // flags from the event. | 51 virtual void Drag(const gfx::Point& location_in_screen, int event_flags) = 0; |
| 52 virtual void Drag(const gfx::Point& location, int event_flags) = 0; | |
| 53 | 52 |
| 54 // Invoked to complete the drag. | 53 // Invoked to complete the drag. |
| 55 virtual void CompleteDrag(int event_flags) = 0; | 54 virtual void CompleteDrag(int event_flags) = 0; |
| 56 | 55 |
| 57 // Reverts the drag. | 56 // Reverts the drag. |
| 58 virtual void RevertDrag() = 0; | 57 virtual void RevertDrag() = 0; |
| 59 | 58 |
| 60 protected: | 59 protected: |
| 61 struct Details { | 60 struct Details { |
| 62 Details(); | 61 Details(); |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // Returns the height of the drag. | 121 // Returns the height of the drag. |
| 123 static int GetHeightForDrag(const Details& details, | 122 static int GetHeightForDrag(const Details& details, |
| 124 int min_height, | 123 int min_height, |
| 125 int* delta_y, | 124 int* delta_y, |
| 126 int grid_size); | 125 int grid_size); |
| 127 }; | 126 }; |
| 128 | 127 |
| 129 } // namespace aura | 128 } // namespace aura |
| 130 | 129 |
| 131 #endif // ASH_WM_WINDOW_RESIZER_H_ | 130 #endif // ASH_WM_WINDOW_RESIZER_H_ |
| OLD | NEW |