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

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: Docking with dock width=0 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..aaec866effd5ba12a18fc01e406170ecbfacf898 100644
--- a/ash/wm/workspace/workspace_window_resizer.h
+++ b/ash/wm/workspace/workspace_window_resizer.h
@@ -7,6 +7,7 @@
#include <vector>
+#include "ash/wm/property_util.h"
#include "ash/wm/window_resizer.h"
#include "ash/wm/workspace/magnetism_matcher.h"
#include "base/compiler_specific.h"
@@ -101,6 +102,10 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
int available_size,
std::vector<int>* sizes) const;
+ // Returns an edge touching the dock bounds when dock is not opened yet or
+ // the edge representing the side that the dock is opened on.
+ DockEdge FindDockEdge(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 +195,9 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// Last SnapType.
SnapType snap_type_;
+ // Last updated touched edge.
stevenjb 2013/06/03 18:19:03 Can you expand this comment? It's not entirely cle
varkha 2013/06/03 21:03:17 This is how I track a window that is still part of
+ ash::DockEdge dock_edge_;
+
// 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