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

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: temporarily exlucde tests failing on win 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
« no previous file with comments | « ui/aura_shell/default_container_event_filter.cc ('k') | ui/aura_shell/default_container_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..4d5924ca7528f89777b03939b3a1ca83a884c5c7 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,15 +21,30 @@ 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);
virtual ~DefaultContainerLayoutManager();
+ // Invoked when a window receives drag event.
+ 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);
+
// Overridden from aura::LayoutManager:
virtual void OnWindowResized() OVERRIDE;
virtual void OnWindowAdded(aura::Window* child) OVERRIDE;
@@ -37,10 +53,20 @@ class AURA_SHELL_EXPORT DefaultContainerLayoutManager
bool visibile) OVERRIDE;
virtual void CalculateBoundsForChild(aura::Window* child,
gfx::Rect* requested_bounds) OVERRIDE;
-
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
+ // ignores bounds check.
+ bool ignore_calculate_bounds_;
+
DISALLOW_COPY_AND_ASSIGN(DefaultContainerLayoutManager);
};
« no previous file with comments | « ui/aura_shell/default_container_event_filter.cc ('k') | ui/aura_shell/default_container_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698