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

Unified Diff: ash/wm/workspace/workspace_layout_manager.h

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Preserve docked state when launcher auto-hide changes. Created 7 years, 8 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: ash/wm/workspace/workspace_layout_manager.h
diff --git a/ash/wm/workspace/workspace_layout_manager.h b/ash/wm/workspace/workspace_layout_manager.h
index 50942682f7dbc7b7ceaca747630290a8dd33d1c2..bbbb61633e97439a9434ca03ed4407935a0ed58a 100644
--- a/ash/wm/workspace/workspace_layout_manager.h
+++ b/ash/wm/workspace/workspace_layout_manager.h
@@ -107,6 +107,24 @@ class ASH_EXPORT WorkspaceLayoutManager
// true is returned. Does nothing otherwise.
bool SetMaximizedOrFullscreenBounds(aura::Window* window);
+ // Enum for bits that contain edges that a window can be stuck to.
+ // Multiple edges can be combined in a bitmask
+ enum StuckWindowEdges {
+ EDGE_NONE = 0,
+ EDGE_LEFT = 1,
+ EDGE_RIGHT = 2,
+ EDGE_TOP = 4,
+ EDGE_BOTTOM = 8,
+ EDGE_ALL = EDGE_LEFT | EDGE_RIGHT | EDGE_TOP | EDGE_BOTTOM
+ };
+
+ // set the bitmask with edges
+ int CalculateStuckEdges(aura::Window* window);
+
+ // restores stuck state for right or bottom edges
+ gfx::Rect AdjustWindowBoundsForStuckEdges(aura::Window* window,
+ const gfx::Rect& bounds);
+
WorkspaceManager* workspace_manager();
aura::RootWindow* root_window_;

Powered by Google App Engine
This is Rietveld 408576698