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

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

Issue 23431009: Windows docking should get triggered by pressing against the screen edge (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Windows docking by pressing against the screen edge (rebase) Created 7 years, 3 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 | « ash/wm/window_util.cc ('k') | ash/wm/workspace/snap_sizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/snap_sizer.h
diff --git a/ash/wm/workspace/snap_sizer.h b/ash/wm/workspace/snap_sizer.h
index bd5f719ae482d1d78be1c20d70fd0895e3eb0703..baf94cd7818290b734e3dd14b28ea5af895933c7 100644
--- a/ash/wm/workspace/snap_sizer.h
+++ b/ash/wm/workspace/snap_sizer.h
@@ -63,6 +63,9 @@ class ASH_EXPORT SnapSizer {
// For unit test purposes this function is not private.
gfx::Rect GetTargetBoundsForSize(size_t size_index) const;
+ // Returns true when snapping sequence is at its last (docking) step.
+ bool end_of_sequence() const { return end_of_sequence_; }
+
private:
// Calculates the amount to increment by. This returns one of -1, 0 or 1 and
// is intended to by applied to |size_index_|. |x| is the current
@@ -96,6 +99,10 @@ class ASH_EXPORT SnapSizer {
// bounds should get.
int size_index_;
+ // Set to true when an attempt is made to increment |size_index_| past
+ // the size of |usable_width_|.
+ bool end_of_sequence_;
+
// If set, |size_index_| will get ignored and the single button default
// setting will be used instead.
bool resize_disabled_;
« no previous file with comments | « ash/wm/window_util.cc ('k') | ash/wm/workspace/snap_sizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698