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

Unified Diff: ash/wm/window_resizer.h

Issue 15008002: Make touch-resizing windows to screen edge possible (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup 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
« no previous file with comments | « no previous file | ash/wm/window_resizer.cc » ('j') | ash/wm/window_resizer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_resizer.h
diff --git a/ash/wm/window_resizer.h b/ash/wm/window_resizer.h
index bc46df85e31a51b9adb9d2932678303db03eee87..7157c146611b5b825579a62becdea5948dc453b6 100644
--- a/ash/wm/window_resizer.h
+++ b/ash/wm/window_resizer.h
@@ -89,6 +89,9 @@ class ASH_EXPORT WindowResizer {
// Will the drag actually modify the window?
bool is_resizable;
+
+ // Is the drag initiated by a touch action?
+ bool is_touch;
};
static gfx::Rect CalculateBoundsForDrag(const Details& details,
@@ -97,6 +100,12 @@ class ASH_EXPORT WindowResizer {
static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds,
int grid_size);
+ // Adjusts amounts of movement for touch resizes. Normally, the window border
+ // being dragged is several pixels behind the finger. This adjustment gives
+ // more speed to the window border, such that the border and the finger line
+ // up at the edge of the screen.
+ static void AdjustDeltas(const Details& details, int* delta_x, int* delta_y);
sadrul 2013/05/08 17:10:56 How about: static gfx::Vector2d AdjustDeltaForTou
mohsen 2013/05/28 23:27:39 delta_x and delta_y are defined as two separate in
+
static bool IsBottomEdge(int component);
private:
« no previous file with comments | « no previous file | ash/wm/window_resizer.cc » ('j') | ash/wm/window_resizer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698