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

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: Fix nits. 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/toplevel_window_event_filter_unittest.cc ('k') | ash/wm/window_resizer.cc » ('j') | no next file with comments »
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 d02be930d374dcb9b61b9691ca1ecb1baf066c80..6caf145a541f34095d5c2b2ae1c32030bd207cf7 100644
--- a/ash/wm/window_resizer.h
+++ b/ash/wm/window_resizer.h
@@ -48,11 +48,12 @@ 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 the event.
+ virtual void Drag(const gfx::Point& location, int event_flags) = 0;
// Invoked to complete the drag.
- virtual void CompleteDrag() = 0;
+ virtual void CompleteDrag(int event_flags) = 0;
// Reverts the drag.
virtual void RevertDrag() = 0;
@@ -62,8 +63,7 @@ class ASH_EXPORT WindowResizer {
Details();
Details(aura::Window* window,
const gfx::Point& location,
- int window_component,
- int grid_size);
+ int window_component);
~Details();
// The window we're resizing.
@@ -89,14 +89,12 @@ class ASH_EXPORT WindowResizer {
// Will the drag actually modify the window?
bool is_resizable;
-
- // Size of the grid.
- int grid_size;
};
static gfx::Rect CalculateBoundsForDrag(
const Details& details,
- const gfx::Point& location);
+ const gfx::Point& location,
+ int grid_size);
static gfx::Rect AdjustBoundsToGrid(const gfx::Rect& bounds,
int grid_size);
@@ -113,17 +111,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,
+ int grid_size);
// Returns the width of the window.
static int GetWidthForDrag(const Details& details,
int min_width,
- int* delta_x);
+ int* delta_x,
+ int grid_size);
// Returns the height of the drag.
static int GetHeightForDrag(const Details& details,
int min_height,
- int* delta_y);
+ int* delta_y,
+ int grid_size);
};
} // namespace aura
« no previous file with comments | « ash/wm/toplevel_window_event_filter_unittest.cc ('k') | ash/wm/window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698