Index: ash/wm/window_util.cc |
diff --git a/ash/wm/window_util.cc b/ash/wm/window_util.cc |
index e3ce3fb11982e62b9e450c7763b8cfa91e3e3a99..3adb2968049eadccb5da5e65493634e3691b9d19 100644 |
--- a/ash/wm/window_util.cc |
+++ b/ash/wm/window_util.cc |
@@ -14,6 +14,7 @@ |
#include "ui/aura/client/aura_constants.h" |
#include "ui/aura/root_window.h" |
#include "ui/aura/window.h" |
+#include "ui/aura/window_delegate.h" |
#include "ui/compositor/layer.h" |
#include "ui/gfx/display.h" |
#include "ui/gfx/rect.h" |
@@ -83,6 +84,11 @@ bool CanResizeWindow(const aura::Window* window) { |
return window->GetProperty(aura::client::kCanResizeKey); |
} |
+bool CanSnapWindow(aura::Window* window) { |
+ // If a window has a maximum size defined, snapping may make it too big. |
+ return window->delegate()->GetMaximumSize().IsEmpty(); |
+} |
+ |
bool IsWindowNormal(const aura::Window* window) { |
return IsWindowStateNormal(window->GetProperty(aura::client::kShowStateKey)); |
} |