Chromium Code Reviews| Index: ash/wm/window_resizer.h |
| diff --git a/ash/wm/window_resizer.h b/ash/wm/window_resizer.h |
| index d8c398fbdb63be01b72495748f075fe7facdd2cd..963daa146dd6dc1b26c7e64bd77f62243f6ec1eb 100644 |
| --- a/ash/wm/window_resizer.h |
| +++ b/ash/wm/window_resizer.h |
| @@ -21,37 +21,6 @@ namespace ash { |
| // windows coordinates. |
| class ASH_EXPORT WindowResizer { |
| public: |
| - // Constants to identify the type of resize. |
| - static const int kBoundsChange_None; |
| - static const int kBoundsChange_Repositions; |
| - static const int kBoundsChange_Resizes; |
| - |
| - // Used to indicate which direction the resize occurs in. |
| - static const int kBoundsChangeDirection_None; |
| - static const int kBoundsChangeDirection_Horizontal; |
| - static const int kBoundsChangeDirection_Vertical; |
| - |
| - WindowResizer(); |
| - virtual ~WindowResizer(); |
| - |
| - // Returns a bitmask of the kBoundsChange_ values. |
| - static int GetBoundsChangeForWindowComponent(int component); |
| - |
| - // Invoked to drag/move/resize the window. |location| is in the coordinates |
| - // of the window supplied to the constructor. |event_flags| is the event |
| - // flags from the event. |
| - virtual void Drag(const gfx::Point& location, int event_flags) = 0; |
| - |
| - // Invoked to complete the drag. |
| - virtual void CompleteDrag(int event_flags) = 0; |
| - |
| - // Reverts the drag. |
| - virtual void RevertDrag() = 0; |
| - |
| - // Returns the target window the resizer was created for. |
| - virtual aura::Window* GetTarget() = 0; |
| - |
| - protected: |
| struct Details { |
|
sky
2012/12/04 15:58:53
Why do you need to expose all this?
mazda
2012/12/04 18:44:41
I needed to create Details in CreateWindowResizer
sky
2012/12/04 22:39:43
Yes please.
|
| Details(); |
| Details(aura::Window* window, |
| @@ -91,6 +60,37 @@ class ASH_EXPORT WindowResizer { |
| bool is_resizable; |
| }; |
| + // Constants to identify the type of resize. |
| + static const int kBoundsChange_None; |
| + static const int kBoundsChange_Repositions; |
| + static const int kBoundsChange_Resizes; |
| + |
| + // Used to indicate which direction the resize occurs in. |
| + static const int kBoundsChangeDirection_None; |
| + static const int kBoundsChangeDirection_Horizontal; |
| + static const int kBoundsChangeDirection_Vertical; |
| + |
| + WindowResizer(); |
| + virtual ~WindowResizer(); |
| + |
| + // Returns a bitmask of the kBoundsChange_ values. |
| + static int GetBoundsChangeForWindowComponent(int component); |
| + |
| + // Invoked to drag/move/resize the window. |location| is in the coordinates |
| + // of the window supplied to the constructor. |event_flags| is the event |
| + // flags from the event. |
| + virtual void Drag(const gfx::Point& location, int event_flags) = 0; |
| + |
| + // Invoked to complete the drag. |
| + virtual void CompleteDrag(int event_flags) = 0; |
| + |
| + // Reverts the drag. |
| + virtual void RevertDrag() = 0; |
| + |
| + // Returns the target window the resizer was created for. |
| + virtual aura::Window* GetTarget() = 0; |
| + |
| + protected: |
| static gfx::Rect CalculateBoundsForDrag(const Details& details, |
| const gfx::Point& location); |
| @@ -124,7 +124,7 @@ class ASH_EXPORT WindowResizer { |
| // Creates a WindowResizer for |window|. This can return a scoped_ptr |
| // initialized with NULL if |window| should not be resized nor dragged. |
| -scoped_ptr<WindowResizer> CreateWindowResizer( |
| +ASH_EXPORT scoped_ptr<WindowResizer> CreateWindowResizer( |
| aura::Window* window, |
| const gfx::Point& point_in_parent, |
| int window_component); |