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

Unified Diff: ash/wm/window_util.h

Issue 161293003: Add test case for updating the bounds of snapped window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_util.h
diff --git a/ash/wm/window_util.h b/ash/wm/window_util.h
index fd77505c40065f38c76bb888d5aa7414abb2f40d..e2322ca68887cc2ae1ffbd51ef5ed1a19b3d5bd5 100644
--- a/ash/wm/window_util.h
+++ b/ash/wm/window_util.h
@@ -15,6 +15,7 @@ class Window;
namespace gfx {
class Rect;
+class Size;
}
namespace ui {
@@ -47,6 +48,10 @@ ASH_EXPORT bool IsWindowMinimized(aura::Window* window);
// Moves the window to the center of the display.
ASH_EXPORT void CenterWindow(aura::Window* window);
+// Adjusts |bounds| so that the size does not exceed |max_size|.
+ASH_EXPORT void AdjustBoundsSmallerThan(const gfx::Size& max_size,
+ gfx::Rect* bounds);
+
// Move the given bounds inside the given |visible_area| in parent coordinates,
// including a safety margin given by |kMinimumOnScreenArea|.
// This also ensures that the top of the bounds is visible.
« no previous file with comments | « no previous file | ash/wm/window_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698