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

Unified Diff: ash/wm/window_util.h

Issue 23471004: Only support left/right maximizing at 50% width when the --ash-enable-alternate-caption-button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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_util.h
diff --git a/ash/wm/window_util.h b/ash/wm/window_util.h
index 6822a77f32ebb8b62ee9c552894edfbca6d06c0d..d463ca001dcdef3e752342f1fb23eb27d38f270a 100644
--- a/ash/wm/window_util.h
+++ b/ash/wm/window_util.h
@@ -8,16 +8,13 @@
#include "ash/ash_export.h"
#include "base/compiler_specific.h"
#include "ui/base/ui_base_types.h"
+#include "ui/gfx/rect.h"
namespace aura {
class RootWindow;
class Window;
}
-namespace gfx {
-class Rect;
-}
-
namespace ui {
class Event;
class Layer;
@@ -29,6 +26,12 @@ const int kMinimumOnScreenArea = 10;
namespace wm {
+// The edge to snap a window to.
+enum SnapEdge {
+SNAP_LEFT_EDGE,
+SNAP_RIGHT_EDGE
+};
+
// Convenience setters/getters for |aura::client::kRootWindowActiveWindow|.
ASH_EXPORT void ActivateWindow(aura::Window* window);
ASH_EXPORT void DeactivateWindow(aura::Window* window);
@@ -82,6 +85,13 @@ ASH_EXPORT void RestoreWindow(aura::Window* window);
// Maximizes or restores |window| based on its state. |window| must not be NULL.
ASH_EXPORT void ToggleMaximizedWindow(aura::Window* window);
+// Returns the bounds for snapped windows at |edge| in parent coordinates.
+ASH_EXPORT gfx::Rect GetSnappedWindowBoundsInParent(aura::Window* window,
+ SnapEdge edge);
+
+// Snaps |window| to the left or the right edge.
+ASH_EXPORT void SnapWindowToEdge(aura::Window*, SnapEdge edge);
+
// Moves the window to the center of the display.
ASH_EXPORT void CenterWindow(aura::Window* window);

Powered by Google App Engine
This is Rietveld 408576698