Index: ash/wallpaper/wallpaper_widget_controller.h |
diff --git a/ash/desktop_background/desktop_background_widget_controller.h b/ash/wallpaper/wallpaper_widget_controller.h |
similarity index 62% |
rename from ash/desktop_background/desktop_background_widget_controller.h |
rename to ash/wallpaper/wallpaper_widget_controller.h |
index 22845545e459d1707dd2e9294c1407f54aaf7fc3..14a2f206bda84f0cd50b56c4f3a6ef9efa1ae8e7 100644 |
--- a/ash/desktop_background/desktop_background_widget_controller.h |
+++ b/ash/wallpaper/wallpaper_widget_controller.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
-#define ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
+#ifndef ASH_WALLPAPER_WALLPAPER_WIDGET_CONTROLLER_H_ |
+#define ASH_WALLPAPER_WALLPAPER_WIDGET_CONTROLLER_H_ |
#include <memory> |
@@ -20,30 +20,27 @@ namespace ash { |
class RootWindowController; |
// This class implements a widget-based wallpaper. |
-// DesktopBackgroundWidgetController is owned by RootWindowController. |
-// When the animation completes the old DesktopBackgroundWidgetController is |
+// WallpaperWidgetController is owned by RootWindowController. |
+// When the animation completes the old WallpaperWidgetController is |
// destroyed. Exported for tests. |
-class ASH_EXPORT DesktopBackgroundWidgetController |
- : public views::WidgetObserver, |
- public WmWindowObserver { |
+class ASH_EXPORT WallpaperWidgetController : public views::WidgetObserver, |
+ public WmWindowObserver { |
public: |
// Create |
James Cook
2016/08/30 05:18:20
nit: remove this
msw
2016/08/30 16:07:59
Done.
|
- explicit DesktopBackgroundWidgetController(views::Widget* widget); |
+ explicit WallpaperWidgetController(views::Widget* widget); |
- ~DesktopBackgroundWidgetController() override; |
+ ~WallpaperWidgetController() override; |
// Overridden from views::WidgetObserver. |
void OnWidgetDestroying(views::Widget* widget) override; |
- // Set bounds of component that draws background. |
+ // Set bounds for the widget that draws the wallpaper. |
void SetBounds(const gfx::Rect& bounds); |
- // Move component from |src_container| in |root_window| to |dest_container|. |
- // It is required for lock screen, when we need to move background so that |
- // it hides user's windows. Returns true if there was something to reparent. |
- bool Reparent(aura::Window* root_window, |
- int src_container, |
- int dest_container); |
+ // Move the wallpaper for |root_window| to the specified |container|. |
+ // The lock screen moves the wallpaper container to hides the user's windows. |
+ // Returns true if there was something to reparent. |
+ bool Reparent(aura::Window* root_window, int container); |
// Starts wallpaper fade in animation. |root_window_controller| is |
// the root window where the animation will happen. (This is |
@@ -65,17 +62,16 @@ class ASH_EXPORT DesktopBackgroundWidgetController |
// Parent of |widget_|. |
WmWindow* widget_parent_; |
- DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundWidgetController); |
+ DISALLOW_COPY_AND_ASSIGN(WallpaperWidgetController); |
}; |
-// This class wraps a DesktopBackgroundWidgetController pointer. It is owned |
-// by RootWindowController. The instance of DesktopBackgroundWidgetController is |
+// This class wraps a WallpaperWidgetController pointer. It is owned |
+// by RootWindowController. The instance of WallpaperWidgetController is |
// moved to this RootWindowController when the animation completes. |
// Exported for tests. |
class ASH_EXPORT AnimatingDesktopController { |
public: |
- explicit AnimatingDesktopController( |
- DesktopBackgroundWidgetController* component); |
+ explicit AnimatingDesktopController(WallpaperWidgetController* component); |
~AnimatingDesktopController(); |
// Stops animation and makes sure OnImplicitAnimationsCompleted() is called if |
@@ -93,16 +89,16 @@ class ASH_EXPORT AnimatingDesktopController { |
// for more details. |
void StopAnimating(); |
- // Gets the wrapped DesktopBackgroundWidgetController pointer. Caller should |
+ // Gets the wrapped WallpaperWidgetController pointer. Caller should |
// take ownership of the pointer if |pass_ownership| is true. |
- DesktopBackgroundWidgetController* GetController(bool pass_ownership); |
+ WallpaperWidgetController* GetController(bool pass_ownership); |
private: |
- std::unique_ptr<DesktopBackgroundWidgetController> controller_; |
+ std::unique_ptr<WallpaperWidgetController> controller_; |
DISALLOW_COPY_AND_ASSIGN(AnimatingDesktopController); |
}; |
} // namespace ash |
-#endif // ASH_DESKTOP_BACKGROUND_DESKTOP_BACKGROUND_WIDGET_CONTROLLER_H_ |
+#endif // ASH_WALLPAPER_WALLPAPER_WIDGET_CONTROLLER_H_ |