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

Unified Diff: ash/wm/window_util.cc

Issue 11434004: ash: Refactor some code that snaps windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . 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/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/workspace/snap_sizer.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 3adb2968049eadccb5da5e65493634e3691b9d19..7c551e00d5e22c972ce30c3bac50c3741e0d0932 100644
--- a/ash/wm/window_util.cc
+++ b/ash/wm/window_util.cc
@@ -86,7 +86,8 @@ bool CanResizeWindow(const aura::Window* window) {
bool CanSnapWindow(aura::Window* window) {
// If a window has a maximum size defined, snapping may make it too big.
- return window->delegate()->GetMaximumSize().IsEmpty();
+ return window->delegate() ? window->delegate()->GetMaximumSize().IsEmpty() :
+ true;
}
bool IsWindowNormal(const aura::Window* window) {
« no previous file with comments | « ash/wm/toplevel_window_event_handler_unittest.cc ('k') | ash/wm/workspace/snap_sizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698