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

Unified Diff: ash/wm/window_resizer.h

Issue 10008084: Add ctrl+drag feature for allowing resizing window with exact positioning. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add ctrl-drap for resizing window to pixel level. 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
Index: ash/wm/window_resizer.h
diff --git a/ash/wm/window_resizer.h b/ash/wm/window_resizer.h
index d02be930d374dcb9b61b9691ca1ecb1baf066c80..58a3b5c267249eb71dfc711db48d7eafee69fb5d 100644
--- a/ash/wm/window_resizer.h
+++ b/ash/wm/window_resizer.h
@@ -48,8 +48,9 @@ class ASH_EXPORT WindowResizer {
static int AlignToGridRoundDown(int location, int grid_size);
// Invoked to drag/move/resize the window. |location| is in the coordinates
- // of the window supplied to the constructor.
- virtual void Drag(const gfx::Point& location) = 0;
+ // of the window supplied to the constructor. |event_flags| is the event
+ // flags from mouse event.
+ virtual void Drag(const gfx::Point& location, int event_flags) = 0;
// Invoked to complete the drag.
virtual void CompleteDrag() = 0;
@@ -96,7 +97,8 @@ class ASH_EXPORT WindowResizer {
static gfx::Rect CalculateBoundsForDrag(
const Details& details,
- const gfx::Point& location);
+ const gfx::Point& location,
+ bool disable_snap_to_grid);
static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds,
int grid_size);
@@ -113,17 +115,20 @@ class ASH_EXPORT WindowResizer {
// Returns the size of the window for the drag.
static gfx::Size GetSizeForDrag(const Details& details,
int* delta_x,
- int* delta_y);
+ int* delta_y,
+ bool disable_snap_to_grid);
// Returns the width of the window.
static int GetWidthForDrag(const Details& details,
int min_width,
- int* delta_x);
+ int* delta_x,
+ bool disable_snap_to_grid);
// Returns the height of the drag.
static int GetHeightForDrag(const Details& details,
int min_height,
- int* delta_y);
+ int* delta_y,
+ bool disable_snap_to_grid);
};
} // namespace aura

Powered by Google App Engine
This is Rietveld 408576698