Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(589)

Unified Diff: ui/aura_shell/default_container_layout_manager.h

Issue 8381015: Add workspace to desktop (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: " Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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);
};

Powered by Google App Engine
This is Rietveld 408576698