Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.cc

Issue 189913011: Remove "if (WallpaperManager::Get())" from MultiUserWindowManagerChromeOS::TransitionWallpaper() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/multi_user_window_manager_chromeos.h" 5 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h"
6 6
7 #include "apps/app_window.h" 7 #include "apps/app_window.h"
8 #include "apps/app_window_registry.h" 8 #include "apps/app_window_registry.h"
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/desktop_background/user_wallpaper_delegate.h" 10 #include "ash/desktop_background/user_wallpaper_delegate.h"
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 655
656 // We can reset the timer at this point. 656 // We can reset the timer at this point.
657 // Note: The timer can be destroyed while it is performing its task. 657 // Note: The timer can be destroyed while it is performing its task.
658 user_changed_animation_timer_.reset(); 658 user_changed_animation_timer_.reset();
659 } 659 }
660 } 660 }
661 661
662 void MultiUserWindowManagerChromeOS::TransitionWallpaper( 662 void MultiUserWindowManagerChromeOS::TransitionWallpaper(
663 MultiUserWindowManagerChromeOS::AnimationStep animation_step) { 663 MultiUserWindowManagerChromeOS::AnimationStep animation_step) {
664 // Handle the wallpaper switch. 664 // Handle the wallpaper switch.
665 if (chromeos::WallpaperManager::Get()) { 665 ash::UserWallpaperDelegate* wallpaper_delegate =
666 ash::UserWallpaperDelegate* wallpaper_delegate = 666 ash::Shell::GetInstance()->user_wallpaper_delegate();
667 ash::Shell::GetInstance()->user_wallpaper_delegate(); 667 if (animation_step == HIDE_OLD_USER) {
668 if (animation_step == HIDE_OLD_USER) { 668 // Set the wallpaper cross dissolve animation duration to our complete
669 // Set the wallpaper cross dissolve animation duration to our complete 669 // animation cycle for a fade in and fade out.
670 // animation cycle for a fade in and fade out. 670 wallpaper_delegate->SetAnimationDurationOverride(2 * kUserFadeTimeMS);
671 wallpaper_delegate->SetAnimationDurationOverride(2 * kUserFadeTimeMS); 671 chromeos::WallpaperManager::Get()->SetUserWallpaperDelayed(
672 chromeos::WallpaperManager::Get()->SetUserWallpaperDelayed( 672 current_user_id_);
673 current_user_id_); 673 } else {
674 } else { 674 // Revert the wallpaper cross dissolve animation duration back to the
675 // Revert the wallpaper cross dissolve animation duration back to the 675 // default.
676 // default. 676 wallpaper_delegate->SetAnimationDurationOverride(0);
677 wallpaper_delegate->SetAnimationDurationOverride(0);
678 }
679 } 677 }
680 } 678 }
681 679
682 void MultiUserWindowManagerChromeOS::TransitionUserShelf( 680 void MultiUserWindowManagerChromeOS::TransitionUserShelf(
683 MultiUserWindowManagerChromeOS::AnimationStep animation_step) { 681 MultiUserWindowManagerChromeOS::AnimationStep animation_step) {
684 // The shelf animation duration override. 682 // The shelf animation duration override.
685 int duration_override = kUserFadeTimeMS; 683 int duration_override = kUserFadeTimeMS;
686 // Handle the shelf order of items. This is done once the old user is hidden. 684 // Handle the shelf order of items. This is done once the old user is hidden.
687 if (animation_step == SHOW_NEW_USER) { 685 if (animation_step == SHOW_NEW_USER) {
688 // Some unit tests have no ChromeLauncherController. 686 // Some unit tests have no ChromeLauncherController.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
864 window->Show(); 862 window->Show();
865 else 863 else
866 window->Hide(); 864 window->Hide();
867 865
868 // Make sure that animations have no influence on the window state after the 866 // Make sure that animations have no influence on the window state after the
869 // call. 867 // call.
870 DCHECK_EQ(visible, window->IsVisible()); 868 DCHECK_EQ(visible, window->IsVisible());
871 } 869 }
872 870
873 } // namespace chrome 871 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698