Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2205)

Unified Diff: ash/desktop_background/desktop_background_widget_controller.h

Issue 10827284: Fix white flash when user sings out and wallpaper animation regression (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits and less confusing class comments Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: ash/desktop_background/desktop_background_widget_controller.h
diff --git a/ash/desktop_background/desktop_background_widget_controller.h b/ash/desktop_background/desktop_background_widget_controller.h
index fe07ef30430b656ed0ad7f90537e09f5de62b491..c50c4fa580c21507b90c96b9ea4213efd2b4502f 100644
--- a/ash/desktop_background/desktop_background_widget_controller.h
+++ b/ash/desktop_background/desktop_background_widget_controller.h
@@ -15,6 +15,11 @@ namespace internal {
// This class hides difference between two possible background implementations:
// effective Layer-based for solid color, and Widget-based for images.
+// DesktopBackgroundWidgetController is installed as an owned property on the
+// RootWindow. To avoid a white flash during wallpaper changes the old
+// DesktopBackgroundWidgetController is moved to a secondary property
+// (kComponentWrapper). When the animation completes the old
+// DesktopBackgroundWidgetController is destroyed.
class DesktopBackgroundWidgetController {
public:
// Create
@@ -43,11 +48,31 @@ class DesktopBackgroundWidgetController {
DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundWidgetController);
};
+// This class wraps a DesktopBackgroundWidgetController pointer. It is installed
+// as an owned property on the RootWindow. DesktopBackgroundWidgetController is
+// moved to this property before animation completes. After animation completes,
+// the kWindowDesktopComponent property on RootWindow is set to the
+// DesktopBackgroundWidgetController in this class.
+class ComponentWrapper {
+ public:
+ explicit ComponentWrapper(
+ DesktopBackgroundWidgetController* component);
+ ~ComponentWrapper() {}
+ DesktopBackgroundWidgetController* component() { return component_; }
+
+ private:
+ DesktopBackgroundWidgetController* component_;
+
+ DISALLOW_COPY_AND_ASSIGN(ComponentWrapper);
+};
+
// Window property key, that binds instance of DesktopBackgroundWidgetController
// to root windows.
extern const aura::WindowProperty<DesktopBackgroundWidgetController*>* const
kWindowDesktopComponent;
+extern const aura::WindowProperty<ComponentWrapper*>* const kComponentWrapper;
+
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/desktop_background/desktop_background_view.cc ('k') | ash/desktop_background/desktop_background_widget_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698