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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 private: | 44 private: |
45 // Overridden from ui::ImplicitAnimationObserver: | 45 // Overridden from ui::ImplicitAnimationObserver: |
46 virtual void OnImplicitAnimationsCompleted() OVERRIDE { | 46 virtual void OnImplicitAnimationsCompleted() OVERRIDE { |
47 ash::Shell* shell = ash::Shell::GetInstance(); | 47 ash::Shell* shell = ash::Shell::GetInstance(); |
48 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished(); | 48 shell->user_wallpaper_delegate()->OnWallpaperAnimationFinished(); |
49 // Only removes old component when wallpaper animation finished. If we | 49 // Only removes old component when wallpaper animation finished. If we |
50 // remove the old one too early, there will be a white flash during | 50 // remove the old one too early, there will be a white flash during |
51 // animation. | 51 // animation. |
52 if (root_window_->GetProperty(kComponentWrapper)) { | 52 if (root_window_->GetProperty(kComponentWrapper)) { |
53 internal::DesktopBackgroundWidgetController* component = | 53 internal::DesktopBackgroundWidgetController* component = |
54 root_window_->GetProperty(kComponentWrapper)->component(); | 54 root_window_->GetProperty(kComponentWrapper)->GetComponent(true); |
55 root_window_->SetProperty(kWindowDesktopComponent, component); | 55 root_window_->SetProperty(kWindowDesktopComponent, component); |
56 } | 56 } |
57 | 57 |
58 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 58 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
59 } | 59 } |
60 | 60 |
61 aura::RootWindow* root_window_; | 61 aura::RootWindow* root_window_; |
62 int container_id_; | 62 int container_id_; |
63 views::Widget* desktop_widget_; | 63 views::Widget* desktop_widget_; |
64 | 64 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, | 180 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, |
181 container_id, | 181 container_id, |
182 desktop_widget)); | 182 desktop_widget)); |
183 desktop_widget->Show(); | 183 desktop_widget->Show(); |
184 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); | 184 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); |
185 return desktop_widget; | 185 return desktop_widget; |
186 } | 186 } |
187 | 187 |
188 } // namespace internal | 188 } // namespace internal |
189 } // namespace ash | 189 } // namespace ash |
OLD | NEW |