| 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/maximize_mode/maximize_mode_window_state.h" | 5 #include "ash/wm/maximize_mode/maximize_mode_window_state.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/public/cpp/shell_window_ids.h" | 9 #include "ash/public/cpp/shell_window_ids.h" |
| 10 #include "ash/screen_util.h" | 10 #include "ash/screen_util.h" |
| (...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 UpdateBounds(window_state, animated); | 300 UpdateBounds(window_state, animated); |
| 301 } | 301 } |
| 302 | 302 |
| 303 window_state->NotifyPostStateTypeChange(old_state_type); | 303 window_state->NotifyPostStateTypeChange(old_state_type); |
| 304 | 304 |
| 305 if (old_state_type == wm::WINDOW_STATE_TYPE_PINNED || | 305 if (old_state_type == wm::WINDOW_STATE_TYPE_PINNED || |
| 306 target_state == wm::WINDOW_STATE_TYPE_PINNED || | 306 target_state == wm::WINDOW_STATE_TYPE_PINNED || |
| 307 old_state_type == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED || | 307 old_state_type == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED || |
| 308 target_state == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED) { | 308 target_state == wm::WINDOW_STATE_TYPE_TRUSTED_PINNED) { |
| 309 Shell::Get()->screen_pinning_controller()->SetPinnedWindow( | 309 Shell::Get()->screen_pinning_controller()->SetPinnedWindow( |
| 310 WmWindow::Get(window_state->window())); | 310 window_state->window()); |
| 311 } | 311 } |
| 312 | 312 |
| 313 if ((window_state->window()->layer()->GetTargetVisibility() || | 313 if ((window_state->window()->layer()->GetTargetVisibility() || |
| 314 old_state_type == wm::WINDOW_STATE_TYPE_MINIMIZED) && | 314 old_state_type == wm::WINDOW_STATE_TYPE_MINIMIZED) && |
| 315 !window_state->window()->layer()->visible()) { | 315 !window_state->window()->layer()->visible()) { |
| 316 // The layer may be hidden if the window was previously minimized. Make | 316 // The layer may be hidden if the window was previously minimized. Make |
| 317 // sure it's visible. | 317 // sure it's visible. |
| 318 window_state->window()->Show(); | 318 window_state->window()->Show(); |
| 319 } | 319 } |
| 320 } | 320 } |
| (...skipping 21 matching lines...) Expand all Loading... |
| 342 // avoid flashing. | 342 // avoid flashing. |
| 343 if (window_state->IsMaximized()) | 343 if (window_state->IsMaximized()) |
| 344 window_state->SetBoundsDirectCrossFade(bounds_in_parent); | 344 window_state->SetBoundsDirectCrossFade(bounds_in_parent); |
| 345 else | 345 else |
| 346 window_state->SetBoundsDirectAnimated(bounds_in_parent); | 346 window_state->SetBoundsDirectAnimated(bounds_in_parent); |
| 347 } | 347 } |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 | 350 |
| 351 } // namespace ash | 351 } // namespace ash |
| OLD | NEW |