| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/desktop_background/desktop_background_view.h" | 5 #include "ash/desktop_background/desktop_background_view.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "ash/ash_export.h" | 9 #include "ash/ash_export.h" |
| 10 #include "ash/common/session/session_state_delegate.h" | 10 #include "ash/common/session/session_state_delegate.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 RootWindowController* root_window_controller = | 226 RootWindowController* root_window_controller = |
| 227 GetRootWindowController(root_window); | 227 GetRootWindowController(root_window); |
| 228 | 228 |
| 229 // Enable wallpaper transition for the following cases: | 229 // Enable wallpaper transition for the following cases: |
| 230 // 1. Initial(OOBE) wallpaper animation. | 230 // 1. Initial(OOBE) wallpaper animation. |
| 231 // 2. Wallpaper fades in from a non empty background. | 231 // 2. Wallpaper fades in from a non empty background. |
| 232 // 3. From an empty background, chrome transit to a logged in user session. | 232 // 3. From an empty background, chrome transit to a logged in user session. |
| 233 // 4. From an empty background, guest user logged in. | 233 // 4. From an empty background, guest user logged in. |
| 234 if (wallpaper_delegate->ShouldShowInitialAnimation() || | 234 if (wallpaper_delegate->ShouldShowInitialAnimation() || |
| 235 root_window_controller->animating_wallpaper_controller() || | 235 root_window_controller->animating_wallpaper_controller() || |
| 236 Shell::GetInstance()->session_state_delegate()->NumberOfLoggedInUsers()) { | 236 WmShell::Get()->GetSessionStateDelegate()->NumberOfLoggedInUsers()) { |
| 237 ::wm::SetWindowVisibilityAnimationTransition( | 237 ::wm::SetWindowVisibilityAnimationTransition( |
| 238 desktop_widget->GetNativeView(), ::wm::ANIMATE_SHOW); | 238 desktop_widget->GetNativeView(), ::wm::ANIMATE_SHOW); |
| 239 int duration_override = wallpaper_delegate->GetAnimationDurationOverride(); | 239 int duration_override = wallpaper_delegate->GetAnimationDurationOverride(); |
| 240 if (duration_override) { | 240 if (duration_override) { |
| 241 ::wm::SetWindowVisibilityAnimationDuration( | 241 ::wm::SetWindowVisibilityAnimationDuration( |
| 242 desktop_widget->GetNativeView(), | 242 desktop_widget->GetNativeView(), |
| 243 base::TimeDelta::FromMilliseconds(duration_override)); | 243 base::TimeDelta::FromMilliseconds(duration_override)); |
| 244 } | 244 } |
| 245 } else { | 245 } else { |
| 246 // Disable animation if transition to login screen from an empty background. | 246 // Disable animation if transition to login screen from an empty background. |
| 247 ::wm::SetWindowVisibilityAnimationTransition( | 247 ::wm::SetWindowVisibilityAnimationTransition( |
| 248 desktop_widget->GetNativeView(), ::wm::ANIMATE_NONE); | 248 desktop_widget->GetNativeView(), ::wm::ANIMATE_NONE); |
| 249 } | 249 } |
| 250 | 250 |
| 251 desktop_widget->SetBounds(params.parent->bounds()); | 251 desktop_widget->SetBounds(params.parent->bounds()); |
| 252 return desktop_widget; | 252 return desktop_widget; |
| 253 } | 253 } |
| 254 | 254 |
| 255 } // namespace ash | 255 } // namespace ash |
| OLD | NEW |