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

Unified Diff: ash/wm/window_util.cc

Issue 11366215: Prevents windows in chromeos from resizing bigger than their maximum size. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix DesktopNativeWidgetAura Created 8 years, 1 month 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/window_util.h ('k') | ash/wm/workspace/workspace_window_resizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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));
}
« no previous file with comments | « ash/wm/window_util.h ('k') | ash/wm/workspace/workspace_window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698