| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/wm/window_resizer.h" | 5 #include "ash/wm/window_resizer.h" |
| 6 | 6 |
| 7 #include "ash/screen_ash.h" | 7 #include "ash/screen_ash.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "ash/wm/property_util.h" | 9 #include "ash/wm/property_util.h" |
| 10 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 if (new_bounds.bottom() > work_area.bottom()) | 204 if (new_bounds.bottom() > work_area.bottom()) |
| 205 new_bounds.Inset(0, 0, 0, | 205 new_bounds.Inset(0, 0, 0, |
| 206 new_bounds.bottom() - work_area.bottom()); | 206 new_bounds.bottom() - work_area.bottom()); |
| 207 } | 207 } |
| 208 if (details.bounds_change & kBoundsChange_Resizes && | 208 if (details.bounds_change & kBoundsChange_Resizes && |
| 209 details.bounds_change & kBoundsChange_Repositions && new_bounds.y() < 0) { | 209 details.bounds_change & kBoundsChange_Repositions && new_bounds.y() < 0) { |
| 210 int delta = new_bounds.y(); | 210 int delta = new_bounds.y(); |
| 211 new_bounds.set_y(0); | 211 new_bounds.set_y(0); |
| 212 new_bounds.set_height(new_bounds.height() + delta); | 212 new_bounds.set_height(new_bounds.height() + delta); |
| 213 } | 213 } |
| 214 // Mark as user changed. |
| 214 return new_bounds; | 215 return new_bounds; |
| 215 } | 216 } |
| 216 | 217 |
| 217 // static | 218 // static |
| 218 bool WindowResizer::IsBottomEdge(int window_component) { | 219 bool WindowResizer::IsBottomEdge(int window_component) { |
| 219 return window_component == HTBOTTOMLEFT || | 220 return window_component == HTBOTTOMLEFT || |
| 220 window_component == HTBOTTOM || | 221 window_component == HTBOTTOM || |
| 221 window_component == HTBOTTOMRIGHT || | 222 window_component == HTBOTTOMRIGHT || |
| 222 window_component == HTGROWBOX; | 223 window_component == HTGROWBOX; |
| 223 } | 224 } |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 details.window).bounds().height(); | 304 details.window).bounds().height(); |
| 304 if (height > max_height) { | 305 if (height > max_height) { |
| 305 height = max_height; | 306 height = max_height; |
| 306 *delta_y = -y_multiplier * (details.initial_bounds.height() - max_height); | 307 *delta_y = -y_multiplier * (details.initial_bounds.height() - max_height); |
| 307 } | 308 } |
| 308 } | 309 } |
| 309 return height; | 310 return height; |
| 310 } | 311 } |
| 311 | 312 |
| 312 } // namespace aura | 313 } // namespace aura |
| OLD | NEW |