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 "ui/aura/client/aura_constants.h" | 9 #include "ui/aura/client/aura_constants.h" |
10 #include "ui/aura/root_window.h" | 10 #include "ui/aura/root_window.h" |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 size_change_direction(0), | 106 size_change_direction(0), |
107 is_resizable(false) { | 107 is_resizable(false) { |
108 } | 108 } |
109 | 109 |
110 WindowResizer::Details::Details(aura::Window* window, | 110 WindowResizer::Details::Details(aura::Window* window, |
111 const gfx::Point& location, | 111 const gfx::Point& location, |
112 int window_component) | 112 int window_component) |
113 : window(window), | 113 : window(window), |
114 initial_bounds(window->bounds()), | 114 initial_bounds(window->bounds()), |
115 initial_location_in_parent(location), | 115 initial_location_in_parent(location), |
| 116 initial_opacity(window->layer()->opacity()), |
116 window_component(window_component), | 117 window_component(window_component), |
117 bounds_change(GetBoundsChangeForWindowComponent(window_component)), | 118 bounds_change(GetBoundsChangeForWindowComponent(window_component)), |
118 position_change_direction( | 119 position_change_direction( |
119 GetPositionChangeDirectionForWindowComponent(window_component)), | 120 GetPositionChangeDirectionForWindowComponent(window_component)), |
120 size_change_direction( | 121 size_change_direction( |
121 GetSizeChangeDirectionForWindowComponent(window_component)), | 122 GetSizeChangeDirectionForWindowComponent(window_component)), |
122 is_resizable(bounds_change != kBoundsChangeDirection_None) { | 123 is_resizable(bounds_change != kBoundsChangeDirection_None) { |
123 } | 124 } |
124 | 125 |
125 WindowResizer::Details::~Details() { | 126 WindowResizer::Details::~Details() { |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 gfx::Screen::GetDisplayNearestWindow(details.window).bounds().height(); | 333 gfx::Screen::GetDisplayNearestWindow(details.window).bounds().height(); |
333 if (height > max_height) { | 334 if (height > max_height) { |
334 height = max_height; | 335 height = max_height; |
335 *delta_y = -y_multiplier * (details.initial_bounds.height() - max_height); | 336 *delta_y = -y_multiplier * (details.initial_bounds.height() - max_height); |
336 } | 337 } |
337 } | 338 } |
338 return height; | 339 return height; |
339 } | 340 } |
340 | 341 |
341 } // namespace aura | 342 } // namespace aura |
OLD | NEW |