Chromium Code Reviews| Index: ui/aura_shell/default_container_layout_manager.h |
| diff --git a/ui/aura_shell/default_container_layout_manager.h b/ui/aura_shell/default_container_layout_manager.h |
| index a693024ebee85e8ebf83a47781ff80657e66bb11..310a8c40956f7038c20352bf1f6352d443835c90 100644 |
| --- a/ui/aura_shell/default_container_layout_manager.h |
| +++ b/ui/aura_shell/default_container_layout_manager.h |
| @@ -12,6 +12,7 @@ |
| #include "ui/aura_shell/aura_shell_export.h" |
| namespace aura { |
| +class MouseEvent; |
| class Window; |
| } |
| @@ -20,13 +21,16 @@ class Rect; |
| } |
| namespace aura_shell { |
| +class WorkspaceManager; |
| + |
| namespace internal { |
| // LayoutManager for the default window container. |
| class AURA_SHELL_EXPORT DefaultContainerLayoutManager |
| : public aura::LayoutManager { |
| public: |
| - explicit DefaultContainerLayoutManager(aura::Window* owner); |
| + DefaultContainerLayoutManager( |
| + aura::Window* owner, WorkspaceManager* workspace_manager); |
|
sky
2011/10/25 20:58:05
each param on its own line.
oshima
2011/10/25 23:37:23
Done.
|
| virtual ~DefaultContainerLayoutManager(); |
| // Overridden from aura::LayoutManager: |
| @@ -38,9 +42,32 @@ class AURA_SHELL_EXPORT DefaultContainerLayoutManager |
| virtual void CalculateBoundsForChild(aura::Window* child, |
| gfx::Rect* requested_bounds) OVERRIDE; |
| + // Invoked when a window receives drag event. |
|
sky
2011/10/25 20:58:05
nit: keep non-virtual methods before virtual metho
oshima
2011/10/25 23:37:23
Done.
|
| + void PrepareForMoveOrResize(aura::Window* drag, aura::MouseEvent* event); |
| + |
| + // Invoked when a drag event didn't start any drag operation. |
| + void CancelMoveOrResize(aura::Window* drag, aura::MouseEvent* event); |
| + |
| + // Invoked when a user finished moving window. |
| + void EndMove(aura::Window* drag, aura::MouseEvent* evnet); |
| + |
| + // Invoked when a user finished resizing window. |
| + void EndResize(aura::Window* drag, aura::MouseEvent* evnet); |
| + |
| private: |
| aura::Window* owner_; |
| + WorkspaceManager* workspace_manager_; |
| + |
| + // A window that are currently moved or resized. Used to put |
| + // different constraints on drag window. |
| + aura::Window* drag_window_; |
| + |
| + // A flag to control layout behavior. This is set to true while |
| + // workspace manager is laying out children and LayoutManager |
| + // skips bounds check. |
| + bool layout_manager_has_control_; |
|
sky
2011/10/25 20:58:05
How about naming this ignore_calculate_bounds_?
oshima
2011/10/25 23:37:23
Done.
|
| + |
| DISALLOW_COPY_AND_ASSIGN(DefaultContainerLayoutManager); |
| }; |