| 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
|
|
|
|
|