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/workspace/workspace_window_resizer.h" | 5 #include "ash/wm/workspace/workspace_window_resizer.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "ash/display/display_controller.h" | 10 #include "ash/display/display_controller.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 for (size_t i = 0; i < attached_windows_.size(); ++i) { | 228 for (size_t i = 0; i < attached_windows_.size(); ++i) { |
229 gfx::Rect bounds(attached_windows_[i]->bounds()); | 229 gfx::Rect bounds(attached_windows_[i]->bounds()); |
230 bounds.set_y(last_y); | 230 bounds.set_y(last_y); |
231 bounds.set_height(initial_size_[i]); | 231 bounds.set_height(initial_size_[i]); |
232 attached_windows_[i]->SetBounds(bounds); | 232 attached_windows_[i]->SetBounds(bounds); |
233 last_y = attached_windows_[i]->bounds().bottom(); | 233 last_y = attached_windows_[i]->bounds().bottom(); |
234 } | 234 } |
235 } | 235 } |
236 } | 236 } |
237 | 237 |
| 238 aura::Window* WorkspaceWindowResizer::GetTarget() { |
| 239 return details_.window; |
| 240 } |
| 241 |
238 WorkspaceWindowResizer::WorkspaceWindowResizer( | 242 WorkspaceWindowResizer::WorkspaceWindowResizer( |
239 const Details& details, | 243 const Details& details, |
240 const std::vector<aura::Window*>& attached_windows) | 244 const std::vector<aura::Window*>& attached_windows) |
241 : details_(details), | 245 : details_(details), |
242 attached_windows_(attached_windows), | 246 attached_windows_(attached_windows), |
243 did_move_or_resize_(false), | 247 did_move_or_resize_(false), |
244 total_min_(0), | 248 total_min_(0), |
245 total_initial_size_(0), | 249 total_initial_size_(0), |
246 snap_type_(SNAP_NONE), | 250 snap_type_(SNAP_NONE), |
247 num_mouse_moves_since_bounds_change_(0), | 251 num_mouse_moves_since_bounds_change_(0), |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
611 gfx::Rect layer_bounds = layer_->bounds(); | 615 gfx::Rect layer_bounds = layer_->bounds(); |
612 layer_bounds.set_origin(gfx::Point(0, 0)); | 616 layer_bounds.set_origin(gfx::Point(0, 0)); |
613 layer_->SetBounds(layer_bounds); | 617 layer_->SetBounds(layer_bounds); |
614 layer_->SetVisible(false); | 618 layer_->SetVisible(false); |
615 // Detach it from the current container. | 619 // Detach it from the current container. |
616 layer_->parent()->Remove(layer_); | 620 layer_->parent()->Remove(layer_); |
617 } | 621 } |
618 | 622 |
619 } // namespace internal | 623 } // namespace internal |
620 } // namespace ash | 624 } // namespace ash |
OLD | NEW |