Chromium Code Reviews| Index: ash/wm/window_resizer.h |
| diff --git a/ash/wm/window_resizer.h b/ash/wm/window_resizer.h |
| index bc46df85e31a51b9adb9d2932678303db03eee87..b2628e119081b7d3a1832da05aa9f46fa38917b5 100644 |
| --- a/ash/wm/window_resizer.h |
| +++ b/ash/wm/window_resizer.h |
| @@ -8,6 +8,7 @@ |
| #include "ash/ash_export.h" |
| #include "base/basictypes.h" |
| #include "base/memory/scoped_ptr.h" |
| +#include "ui/aura/client/window_move_client.h" |
| #include "ui/gfx/rect.h" |
| namespace aura { |
| @@ -56,7 +57,8 @@ class ASH_EXPORT WindowResizer { |
| Details(); |
| Details(aura::Window* window, |
| const gfx::Point& location, |
| - int window_component); |
| + int window_component, |
| + aura::client::WindowMoveSource source); |
| ~Details(); |
| // The window we're resizing. |
| @@ -89,6 +91,9 @@ class ASH_EXPORT WindowResizer { |
| // Will the drag actually modify the window? |
| bool is_resizable; |
| + |
| + // Source of the event initiating the drag. |
| + aura::client::WindowMoveSource source; |
| }; |
| static gfx::Rect CalculateBoundsForDrag(const Details& details, |
| @@ -97,6 +102,11 @@ class ASH_EXPORT WindowResizer { |
| static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds, |
| int grid_size); |
| + // In case of touch resizing, adjusts deltas so that the border is positioned |
| + // just under the touch point. |
| + static void AdjustDeltaForTouchResize(const Details& details, int* delta_x, |
|
sky
2013/06/14 15:57:27
nit: when you wrap put each param on its own line.
sky
2013/06/14 15:57:27
Can this be private?
sky
2013/06/14 15:57:27
Can this be private?
mohsen
2013/06/14 16:21:48
Yes. It should be. Done.
mohsen
2013/06/14 16:21:48
Done. I thought that only if no parameter fits in
|
| + int* delta_y); |
| + |
| static bool IsBottomEdge(int component); |
| private: |
| @@ -127,7 +137,8 @@ class ASH_EXPORT WindowResizer { |
| ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizer( |
| aura::Window* window, |
| const gfx::Point& point_in_parent, |
| - int window_component); |
| + int window_component, |
| + aura::client::WindowMoveSource source); |
| } // namespace aura |