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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 break; | 421 break; |
422 case WINDOW_STATE_TYPE_INACTIVE: | 422 case WINDOW_STATE_TYPE_INACTIVE: |
423 case WINDOW_STATE_TYPE_DETACHED: | 423 case WINDOW_STATE_TYPE_DETACHED: |
424 case WINDOW_STATE_TYPE_END: | 424 case WINDOW_STATE_TYPE_END: |
425 case WINDOW_STATE_TYPE_AUTO_POSITIONED: | 425 case WINDOW_STATE_TYPE_AUTO_POSITIONED: |
426 return; | 426 return; |
427 } | 427 } |
428 | 428 |
429 if (state_type != WINDOW_STATE_TYPE_MINIMIZED) { | 429 if (state_type != WINDOW_STATE_TYPE_MINIMIZED) { |
430 if (old_state_type == WINDOW_STATE_TYPE_MINIMIZED || | 430 if (old_state_type == WINDOW_STATE_TYPE_MINIMIZED || |
431 (window_state->IsFullscreen() && | 431 window_state->IsFullscreen()) { |
432 !window_state->animate_to_fullscreen())) { | |
433 window_state->SetBoundsDirect(bounds_in_parent); | 432 window_state->SetBoundsDirect(bounds_in_parent); |
434 } else if (window_state->IsMaximizedOrFullscreen() || | 433 } else if (window_state->IsMaximizedOrFullscreen() || |
435 IsMaximizedOrFullscreenWindowStateType(old_state_type)) { | 434 IsMaximizedOrFullscreenWindowStateType(old_state_type)) { |
436 window_state->SetBoundsDirectCrossFade(bounds_in_parent); | 435 window_state->SetBoundsDirectCrossFade(bounds_in_parent); |
437 } else { | 436 } else { |
438 window_state->SetBoundsDirectAnimated(bounds_in_parent); | 437 window_state->SetBoundsDirectAnimated(bounds_in_parent); |
439 } | 438 } |
440 } | 439 } |
441 | 440 |
442 if (window_state->IsMinimized()) { | 441 if (window_state->IsMinimized()) { |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
526 AdjustBoundsSmallerThan(work_area_in_parent.size(), &child_bounds); | 525 AdjustBoundsSmallerThan(work_area_in_parent.size(), &child_bounds); |
527 window_state->AdjustSnappedBounds(&child_bounds); | 526 window_state->AdjustSnappedBounds(&child_bounds); |
528 window_state->SetBoundsDirect(child_bounds); | 527 window_state->SetBoundsDirect(child_bounds); |
529 } else if (!SetMaximizedOrFullscreenBounds(window_state)) { | 528 } else if (!SetMaximizedOrFullscreenBounds(window_state)) { |
530 window_state->SetBoundsConstrained(event->requested_bounds()); | 529 window_state->SetBoundsConstrained(event->requested_bounds()); |
531 } | 530 } |
532 } | 531 } |
533 | 532 |
534 } // namespace wm | 533 } // namespace wm |
535 } // namespace ash | 534 } // namespace ash |
OLD | NEW |