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 LOG(ERROR) << "===taken ownership==="; | |
sky
2012/08/15 20:45:42
remove this.
bshe
2012/08/15 20:49:39
Aha. Sorry, I missed it.
| |
55 root_window_->SetProperty(kWindowDesktopComponent, component); | 56 root_window_->SetProperty(kWindowDesktopComponent, component); |
56 } | 57 } |
57 | 58 |
58 MessageLoop::current()->DeleteSoon(FROM_HERE, this); | 59 MessageLoop::current()->DeleteSoon(FROM_HERE, this); |
59 } | 60 } |
60 | 61 |
61 aura::RootWindow* root_window_; | 62 aura::RootWindow* root_window_; |
62 int container_id_; | 63 int container_id_; |
63 views::Widget* desktop_widget_; | 64 views::Widget* desktop_widget_; |
64 | 65 |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
180 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, | 181 settings.AddObserver(new ShowWallpaperAnimationObserver(root_window, |
181 container_id, | 182 container_id, |
182 desktop_widget)); | 183 desktop_widget)); |
183 desktop_widget->Show(); | 184 desktop_widget->Show(); |
184 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); | 185 desktop_widget->GetNativeView()->SetName("DesktopBackgroundView"); |
185 return desktop_widget; | 186 return desktop_widget; |
186 } | 187 } |
187 | 188 |
188 } // namespace internal | 189 } // namespace internal |
189 } // namespace ash | 190 } // namespace ash |
OLD | NEW |