| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/default_state.h" | 5 #include "ash/wm/default_state.h" |
| 6 | 6 |
| 7 #include "ash/display/display_controller.h" | 7 #include "ash/display/display_controller.h" |
| 8 #include "ash/screen_util.h" | 8 #include "ash/screen_util.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "ash/shell_window_ids.h" | 10 #include "ash/shell_window_ids.h" |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 window_state->SetBoundsDirectCrossFade(bounds_in_parent); | 435 window_state->SetBoundsDirectCrossFade(bounds_in_parent); |
| 436 } else { | 436 } else { |
| 437 window_state->SetBoundsDirectAnimated(bounds_in_parent); | 437 window_state->SetBoundsDirectAnimated(bounds_in_parent); |
| 438 } | 438 } |
| 439 } | 439 } |
| 440 | 440 |
| 441 if (window_state->IsMinimized()) { | 441 if (window_state->IsMinimized()) { |
| 442 // Save the previous show state so that we can correctly restore it. | 442 // Save the previous show state so that we can correctly restore it. |
| 443 window_state->window()->SetProperty(aura::client::kRestoreShowStateKey, | 443 window_state->window()->SetProperty(aura::client::kRestoreShowStateKey, |
| 444 ToWindowShowState(old_state_type)); | 444 ToWindowShowState(old_state_type)); |
| 445 views::corewm::SetWindowVisibilityAnimationType( | 445 ::wm::SetWindowVisibilityAnimationType( |
| 446 window_state->window(), WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); | 446 window_state->window(), WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); |
| 447 | 447 |
| 448 // Hide the window. | 448 // Hide the window. |
| 449 window_state->window()->Hide(); | 449 window_state->window()->Hide(); |
| 450 // Activate another window. | 450 // Activate another window. |
| 451 if (window_state->IsActive()) | 451 if (window_state->IsActive()) |
| 452 window_state->Deactivate(); | 452 window_state->Deactivate(); |
| 453 } else if ((window_state->window()->TargetVisibility() || | 453 } else if ((window_state->window()->TargetVisibility() || |
| 454 old_state_type == WINDOW_STATE_TYPE_MINIMIZED) && | 454 old_state_type == WINDOW_STATE_TYPE_MINIMIZED) && |
| 455 !window_state->window()->layer()->visible()) { | 455 !window_state->window()->layer()->visible()) { |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 AdjustBoundsSmallerThan(work_area_in_parent.size(), &child_bounds); | 525 AdjustBoundsSmallerThan(work_area_in_parent.size(), &child_bounds); |
| 526 window_state->AdjustSnappedBounds(&child_bounds); | 526 window_state->AdjustSnappedBounds(&child_bounds); |
| 527 window_state->SetBoundsDirect(child_bounds); | 527 window_state->SetBoundsDirect(child_bounds); |
| 528 } else if (!SetMaximizedOrFullscreenBounds(window_state)) { | 528 } else if (!SetMaximizedOrFullscreenBounds(window_state)) { |
| 529 window_state->SetBoundsConstrained(event->requested_bounds()); | 529 window_state->SetBoundsConstrained(event->requested_bounds()); |
| 530 } | 530 } |
| 531 } | 531 } |
| 532 | 532 |
| 533 } // namespace wm | 533 } // namespace wm |
| 534 } // namespace ash | 534 } // namespace ash |
| OLD | NEW |