| 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 "chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h" | 5 #include "chrome/browser/ui/ash/multi_user/user_switch_animator_chromeos.h" |
| 6 | 6 |
| 7 #include "ash/aura/wm_window_aura.h" | 7 #include "ash/aura/wm_window_aura.h" |
| 8 #include "ash/common/shelf/shelf_layout_manager.h" | 8 #include "ash/common/shelf/shelf_layout_manager.h" |
| 9 #include "ash/common/shelf/shelf_widget.h" | 9 #include "ash/common/shelf/shelf_widget.h" |
| 10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
| (...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 // Maximized windows should be hidden, but visually kept visible | 327 // Maximized windows should be hidden, but visually kept visible |
| 328 // in order to prevent showing the background while the animation is | 328 // in order to prevent showing the background while the animation is |
| 329 // in progress. Therefore we detach the old layer and recreate fresh | 329 // in progress. Therefore we detach the old layer and recreate fresh |
| 330 // ones. The old layers will be destructed at the animation step | 330 // ones. The old layers will be destructed at the animation step |
| 331 // |ANIMATION_STEP_FINALIZE|. | 331 // |ANIMATION_STEP_FINALIZE|. |
| 332 // old_layers_.push_back(wm::RecreateLayers(window)); | 332 // old_layers_.push_back(wm::RecreateLayers(window)); |
| 333 // We only want to do this for the first (foreground) maximized | 333 // We only want to do this for the first (foreground) maximized |
| 334 // window we encounter. | 334 // window we encounter. |
| 335 found_foreground_maximized_window = true; | 335 found_foreground_maximized_window = true; |
| 336 ui::LayerTreeOwner* old_layer = | 336 ui::LayerTreeOwner* old_layer = |
| 337 wm::RecreateLayers(window, nullptr).release(); | 337 wm::RecreateLayers(window).release(); |
| 338 window->layer()->parent()->StackAtBottom(old_layer->root()); | 338 window->layer()->parent()->StackAtBottom(old_layer->root()); |
| 339 new MaximizedWindowAnimationWatcher(window->layer()->GetAnimator(), | 339 new MaximizedWindowAnimationWatcher(window->layer()->GetAnimator(), |
| 340 old_layer); | 340 old_layer); |
| 341 } | 341 } |
| 342 | 342 |
| 343 owner_->SetWindowVisibility(window, false, duration); | 343 owner_->SetWindowVisibility(window, false, duration); |
| 344 } | 344 } |
| 345 } | 345 } |
| 346 | 346 |
| 347 // Show new user. | 347 // Show new user. |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 if (itr != window_to_entry_map.end()) { | 437 if (itr != window_to_entry_map.end()) { |
| 438 windows_by_account_id_[itr->second->show_for_user()].push_back( | 438 windows_by_account_id_[itr->second->show_for_user()].push_back( |
| 439 child_window); | 439 child_window); |
| 440 } | 440 } |
| 441 } | 441 } |
| 442 } | 442 } |
| 443 } | 443 } |
| 444 } | 444 } |
| 445 | 445 |
| 446 } // namespace chrome | 446 } // namespace chrome |
| OLD | NEW |