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/desktop_background/desktop_background_controller.h" | 10 #include "ash/desktop_background/desktop_background_controller.h" |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 private: | 54 private: |
55 // Overridden from ui::ImplicitAnimationObserver: | 55 // Overridden from ui::ImplicitAnimationObserver: |
56 virtual void OnImplicitAnimationsScheduled() OVERRIDE { | 56 virtual void OnImplicitAnimationsScheduled() OVERRIDE { |
57 if (is_initial_animation_) { | 57 if (is_initial_animation_) { |
58 GetRootWindowController(root_window_)-> | 58 GetRootWindowController(root_window_)-> |
59 HandleInitialDesktopBackgroundAnimationStarted(); | 59 HandleInitialDesktopBackgroundAnimationStarted(); |
60 } | 60 } |
61 } | 61 } |
62 | 62 |
63 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 63 virtual void OnImplicitAnimationsCompleted() OVERRIDE { |
64 DCHECK(desktop_widget_); | |
65 GetRootWindowController(root_window_)->HandleDesktopBackgroundVisible(); | 64 GetRootWindowController(root_window_)->HandleDesktopBackgroundVisible(); |
66 ash::Shell::GetInstance()->user_wallpaper_delegate()-> | 65 ash::Shell::GetInstance()->user_wallpaper_delegate()-> |
67 OnWallpaperAnimationFinished(); | 66 OnWallpaperAnimationFinished(); |
68 // Only removes old component when wallpaper animation finished. If we | 67 // Only removes old component when wallpaper animation finished. If we |
69 // remove the old one before the new wallpaper is done fading in there will | 68 // remove the old one before the new wallpaper is done fading in there will |
70 // be a white flash during the animation. | 69 // be a white flash during the animation. |
71 if (root_window_->GetProperty(kAnimatingDesktopController)) { | 70 if (root_window_->GetProperty(kAnimatingDesktopController)) { |
72 DesktopBackgroundWidgetController* controller = | 71 DesktopBackgroundWidgetController* controller = |
73 root_window_->GetProperty(kAnimatingDesktopController)-> | 72 root_window_->GetProperty(kAnimatingDesktopController)-> |
74 GetController(true); | 73 GetController(true); |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 settings.AddObserver(new ShowWallpaperAnimationObserver( | 218 settings.AddObserver(new ShowWallpaperAnimationObserver( |
220 root_window, desktop_widget, | 219 root_window, desktop_widget, |
221 wallpaper_delegate->ShouldShowInitialAnimation())); | 220 wallpaper_delegate->ShouldShowInitialAnimation())); |
222 desktop_widget->Show(); | 221 desktop_widget->Show(); |
223 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); | 222 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); |
224 return desktop_widget; | 223 return desktop_widget; |
225 } | 224 } |
226 | 225 |
227 } // namespace internal | 226 } // namespace internal |
228 } // namespace ash | 227 } // namespace ash |
OLD | NEW |