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

Unified Diff: chrome/browser/ui/views/ash/window_positioner.h

Issue 9969164: Ignoring alignment when it pushes a window out of the screen (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Moving align to grid functionality into WindowPositioner / WindowSizer 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: chrome/browser/ui/views/ash/window_positioner.h
diff --git a/chrome/browser/ui/views/ash/window_positioner.h b/chrome/browser/ui/views/ash/window_positioner.h
index 599ac53891eda483fbbba04b8670e9c07ee94758..76cc12373d5242ccc2c3b3e133285f27686f5c23 100644
--- a/chrome/browser/ui/views/ash/window_positioner.h
+++ b/chrome/browser/ui/views/ash/window_positioner.h
@@ -31,12 +31,18 @@ class WindowPositioner {
// Find a smart way to position the popup window. If there is no space this
// function will return an empty rectangle.
gfx::Rect SmartPopupPosition(const gfx::Rect& old_pos,
- const gfx::Rect& work_space);
+ const gfx::Rect& work_space,
+ int grid);
// Find the next available cascading popup position (on the given screen).
gfx::Rect NormalPopupPosition(const gfx::Rect& old_pos,
const gfx::Rect& work_space);
+ // Align the location to the grid / snap to the right / bottom corner.
+ gfx::Rect AlignPopupPosition(const gfx::Rect &pos,
+ const gfx::Rect &work_space,
+ int grid);
+
// Constants to identify the type of resize.
static const int kBoundsChange_None;

Powered by Google App Engine
This is Rietveld 408576698