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

Unified Diff: ash/desktop_background/desktop_background_widget_controller.h

Issue 2032613002: Converts RootWindowLayoutManager to common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 11ff17da29b3af7535721150cc603135e7e86e36..dcfaee036c2b64aaba3ab9fd12b5940640b45ecd 100644
--- a/ash/desktop_background/desktop_background_widget_controller.h
+++ b/ash/desktop_background/desktop_background_widget_controller.h
@@ -8,12 +8,14 @@
#include <memory>
#include "ash/ash_export.h"
+#include "ash/common/wm/wm_window_observer.h"
#include "base/macros.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/views/widget/widget.h"
#include "ui/views/widget/widget_observer.h"
+namespace aura {
+class Window;
+}
+
namespace ash {
class RootWindowController;
@@ -22,7 +24,8 @@ class RootWindowController;
// When the animation completes the old DesktopBackgroundWidgetController is
// destroyed. Exported for tests.
class ASH_EXPORT DesktopBackgroundWidgetController
- : public views::WidgetObserver {
+ : public views::WidgetObserver,
+ public wm::WmWindowObserver {
public:
// Create
explicit DesktopBackgroundWidgetController(views::Widget* widget);
@@ -33,7 +36,7 @@ class ASH_EXPORT DesktopBackgroundWidgetController
void OnWidgetDestroying(views::Widget* widget) override;
// Set bounds of component that draws background.
- void SetBounds(gfx::Rect bounds);
+ 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
@@ -50,8 +53,18 @@ class ASH_EXPORT DesktopBackgroundWidgetController
views::Widget* widget() { return widget_; }
private:
+ void RemoveObservers();
+
+ // wm::WmWindowObserver:
+ void OnWindowBoundsChanged(wm::WmWindow* window,
+ const gfx::Rect& old_bounds,
+ const gfx::Rect& new_bounds) override;
+
views::Widget* widget_;
+ // Parent of |widget_|.
+ wm::WmWindow* widget_parent_;
+
DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundWidgetController);
};

Powered by Google App Engine
This is Rietveld 408576698