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

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

Issue 10910164: Removes the grid from ash. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix ShelfBrowserTest Created 8 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/workspace/workspace_manager_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_window_resizer.h
diff --git a/ash/wm/workspace/workspace_window_resizer.h b/ash/wm/workspace/workspace_window_resizer.h
index 15fb0c21aaed1875911b290dcfbfbcc7a383a962..657bf0138b30bc2232fbc2a5394c8af8d0680d63 100644
--- a/ash/wm/workspace/workspace_window_resizer.h
+++ b/ash/wm/workspace/workspace_window_resizer.h
@@ -42,6 +42,10 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// TODO: this should come from a property on the window.
static const int kMinOnscreenHeight;
+ // Snap region when dragging close to the edges. That is, as the window gets
+ // this close to an edge of the screen it snaps to the edge.
+ static const int kScreenEdgeInset;
+
virtual ~WorkspaceWindowResizer();
static WorkspaceWindowResizer* Create(
@@ -81,23 +85,21 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
};
// Returns the final bounds to place the window at. This differs from
- // the current if there is a grid.
- gfx::Rect GetFinalBounds(const gfx::Rect& bounds, int grid_size) const;
+ // the current when snapping.
+ gfx::Rect GetFinalBounds(const gfx::Rect& bounds) const;
// Lays out the attached windows. |bounds| is the bounds of the main window.
- void LayoutAttachedWindows(const gfx::Rect& bounds, int grid_size);
+ void LayoutAttachedWindows(const gfx::Rect& bounds);
// Calculates the size (along the primary axis) of the attached windows.
// |initial_size| is the initial size of the main window, |current_size| the
// new size of the main window, |start| the position to layout the attached
// windows from and |end| the coordinate to position to.
- void CalculateAttachedSizes(
- int initial_size,
- int current_size,
- int start,
- int end,
- int grid_size,
- std::vector<int>* sizes) const;
+ void CalculateAttachedSizes(int initial_size,
+ int current_size,
+ int start,
+ int end,
+ std::vector<int>* sizes) const;
// Adjusts the bounds to enforce that windows are vertically contained in the
// work area.
@@ -119,8 +121,7 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// Updates the bounds of the phantom window for window snapping.
void UpdateSnapPhantomWindow(const gfx::Point& location,
- const gfx::Rect& bounds,
- int grid_size);
+ const gfx::Rect& bounds);
// Updates the bounds of the phantom window for window dragging. Set true on
// |in_original_root| if the pointer is still in |window()->GetRootWindow()|.
« no previous file with comments | « ash/wm/workspace/workspace_manager_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698