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

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

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dock on left or right edge Created 7 years, 7 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_window_resizer.h
diff --git a/ash/wm/workspace/workspace_window_resizer.h b/ash/wm/workspace/workspace_window_resizer.h
index 424e47d29f4890086fa5d3e49d694360e1a3eb2b..54d7d2f226f9c2387eaa0b9deb7a46133b45ec99 100644
--- a/ash/wm/workspace/workspace_window_resizer.h
+++ b/ash/wm/workspace/workspace_window_resizer.h
@@ -101,6 +101,10 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
int available_size,
std::vector<int>* sizes) const;
+ // Returns a bitmask of all edges touching the dock bounds when dock is not
+ // opened yet or the edge representing the side that the dock is opened on.
+ int CalculateDockEdges(const gfx::Rect& bounds) const;
+
// Divides |amount| evenly between |sizes|. If |amount| is negative it
// indicates how many pixels |sizes| should be shrunk by.
// Returns how many pixels failed to be allocated/removed from |sizes|.
@@ -190,6 +194,9 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// Last SnapType.
SnapType snap_type_;
+ // Last updated bitmask of all touched edges.
+ mutable int dock_edges_mask_;
+
// Number of mouse moves since the last bounds change. Only used for phantom
// placement to track when the mouse is moved while pushed against the edge of
// the screen.

Powered by Google App Engine
This is Rietveld 408576698