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/common/wallpaper/wallpaper_view.h" | 5 #include "ash/common/wallpaper/wallpaper_view.h" |
6 | 6 |
7 #include "ash/common/session/session_state_delegate.h" | 7 #include "ash/common/session/session_controller.h" |
8 #include "ash/common/wallpaper/wallpaper_controller.h" | 8 #include "ash/common/wallpaper/wallpaper_controller.h" |
9 #include "ash/common/wallpaper/wallpaper_delegate.h" | 9 #include "ash/common/wallpaper/wallpaper_delegate.h" |
10 #include "ash/common/wallpaper/wallpaper_widget_controller.h" | 10 #include "ash/common/wallpaper/wallpaper_widget_controller.h" |
11 #include "ash/common/wm/overview/window_selector_controller.h" | 11 #include "ash/common/wm/overview/window_selector_controller.h" |
12 #include "ash/common/wm_shell.h" | 12 #include "ash/common/wm_shell.h" |
13 #include "ash/common/wm_window.h" | 13 #include "ash/common/wm_window.h" |
14 #include "ash/root_window_controller.h" | 14 #include "ash/root_window_controller.h" |
15 #include "ash/shell.h" | 15 #include "ash/shell.h" |
16 #include "ui/display/display.h" | 16 #include "ui/display/display.h" |
17 #include "ui/display/manager/managed_display_info.h" | 17 #include "ui/display/manager/managed_display_info.h" |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 RootWindowController* root_window_controller = | 215 RootWindowController* root_window_controller = |
216 root_window->GetRootWindowController(); | 216 root_window->GetRootWindowController(); |
217 | 217 |
218 // Enable wallpaper transition for the following cases: | 218 // Enable wallpaper transition for the following cases: |
219 // 1. Initial(OOBE) wallpaper animation. | 219 // 1. Initial(OOBE) wallpaper animation. |
220 // 2. Wallpaper fades in from a non empty background. | 220 // 2. Wallpaper fades in from a non empty background. |
221 // 3. From an empty background, chrome transit to a logged in user session. | 221 // 3. From an empty background, chrome transit to a logged in user session. |
222 // 4. From an empty background, guest user logged in. | 222 // 4. From an empty background, guest user logged in. |
223 if (wallpaper_delegate->ShouldShowInitialAnimation() || | 223 if (wallpaper_delegate->ShouldShowInitialAnimation() || |
224 root_window_controller->animating_wallpaper_widget_controller() || | 224 root_window_controller->animating_wallpaper_widget_controller() || |
225 WmShell::Get()->GetSessionStateDelegate()->NumberOfLoggedInUsers()) { | 225 WmShell::Get()->session_controller()->NumberOfLoggedInUsers()) { |
226 wallpaper_window->SetVisibilityAnimationTransition(::wm::ANIMATE_SHOW); | 226 wallpaper_window->SetVisibilityAnimationTransition(::wm::ANIMATE_SHOW); |
227 int duration_override = wallpaper_delegate->GetAnimationDurationOverride(); | 227 int duration_override = wallpaper_delegate->GetAnimationDurationOverride(); |
228 if (duration_override) { | 228 if (duration_override) { |
229 wallpaper_window->SetVisibilityAnimationDuration( | 229 wallpaper_window->SetVisibilityAnimationDuration( |
230 base::TimeDelta::FromMilliseconds(duration_override)); | 230 base::TimeDelta::FromMilliseconds(duration_override)); |
231 } | 231 } |
232 } else { | 232 } else { |
233 // Disable animation if transition to login screen from an empty background. | 233 // Disable animation if transition to login screen from an empty background. |
234 wallpaper_window->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE); | 234 wallpaper_window->SetVisibilityAnimationTransition(::wm::ANIMATE_NONE); |
235 } | 235 } |
236 | 236 |
237 WmWindow* container = root_window->GetChildByShellWindowId(container_id); | 237 WmWindow* container = root_window->GetChildByShellWindowId(container_id); |
238 wallpaper_widget->SetBounds(container->GetBounds()); | 238 wallpaper_widget->SetBounds(container->GetBounds()); |
239 return wallpaper_widget; | 239 return wallpaper_widget; |
240 } | 240 } |
241 | 241 |
242 } // namespace ash | 242 } // namespace ash |
OLD | NEW |