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

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

Issue 9956056: ash: Add accelerator for snapping windows left/right. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 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
« 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 e389de7a70dd88fbb706496394dd4315beb8a16d..145e4e58b2cbe1e278b1b810ba533024b853e8ce 100644
--- a/ash/wm/workspace/snap_sizer.h
+++ b/ash/wm/workspace/snap_sizer.h
@@ -38,6 +38,10 @@ class ASH_EXPORT SnapSizer {
// Bounds to position the window at.
const gfx::Rect& target_bounds() const { return target_bounds_; }
+ // Returns the appropriate snap bounds (e.g. if a window is already snapped,
+ // then it returns the next snap-bounds).
+ gfx::Rect GetSnapBounds(const gfx::Rect& bounds);
+
private:
// Calculates the amount to increment by. This returns one of -1, 0 or 1 and
// is intended to by applied to |percent_index_|. |x| is the current
@@ -53,6 +57,8 @@ class ASH_EXPORT SnapSizer {
// Returns the target bounds based on the edge and |percent_index_|.
gfx::Rect GetTargetBounds() const;
+ gfx::Rect GetTargetBoundsForPercent(int percent_index) const;
+
// Returns true if the specified point is along the edge of the screen.
bool AlongEdge(int x) const;
« 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