| 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/common/wm/maximize_mode/maximize_mode_window_state.h" | 5 #include "ash/common/wm/maximize_mode/maximize_mode_window_state.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" | 9 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" |
| 10 #include "ash/common/wm/window_animation_types.h" | 10 #include "ash/common/wm/window_animation_types.h" |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 if (current_state_type_ == target_state) { | 256 if (current_state_type_ == target_state) { |
| 257 if (target_state == wm::WINDOW_STATE_TYPE_MINIMIZED) | 257 if (target_state == wm::WINDOW_STATE_TYPE_MINIMIZED) |
| 258 return; | 258 return; |
| 259 // If the state type did not change, update it accordingly. | 259 // If the state type did not change, update it accordingly. |
| 260 UpdateBounds(window_state, animated); | 260 UpdateBounds(window_state, animated); |
| 261 return; | 261 return; |
| 262 } | 262 } |
| 263 | 263 |
| 264 const wm::WindowStateType old_state_type = current_state_type_; | 264 const wm::WindowStateType old_state_type = current_state_type_; |
| 265 current_state_type_ = target_state; | 265 current_state_type_ = target_state; |
| 266 window_state->UpdateWindowShowStateFromStateType(); | 266 window_state->UpdateWindowPropertiesFromStateType(); |
| 267 window_state->NotifyPreStateTypeChange(old_state_type); | 267 window_state->NotifyPreStateTypeChange(old_state_type); |
| 268 | 268 |
| 269 if (target_state == wm::WINDOW_STATE_TYPE_MINIMIZED) { | 269 if (target_state == wm::WINDOW_STATE_TYPE_MINIMIZED) { |
| 270 window_state->window()->SetVisibilityAnimationType( | 270 window_state->window()->SetVisibilityAnimationType( |
| 271 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); | 271 wm::WINDOW_VISIBILITY_ANIMATION_TYPE_MINIMIZE); |
| 272 window_state->window()->Hide(); | 272 window_state->window()->Hide(); |
| 273 if (window_state->IsActive()) | 273 if (window_state->IsActive()) |
| 274 window_state->Deactivate(); | 274 window_state->Deactivate(); |
| 275 } else { | 275 } else { |
| 276 UpdateBounds(window_state, animated); | 276 UpdateBounds(window_state, animated); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 318 // avoid flashing. | 318 // avoid flashing. |
| 319 if (window_state->IsMaximized()) | 319 if (window_state->IsMaximized()) |
| 320 window_state->SetBoundsDirectCrossFade(bounds_in_parent); | 320 window_state->SetBoundsDirectCrossFade(bounds_in_parent); |
| 321 else | 321 else |
| 322 window_state->SetBoundsDirectAnimated(bounds_in_parent); | 322 window_state->SetBoundsDirectAnimated(bounds_in_parent); |
| 323 } | 323 } |
| 324 } | 324 } |
| 325 } | 325 } |
| 326 | 326 |
| 327 } // namespace ash | 327 } // namespace ash |
| OLD | NEW |