Index: ash/wallpaper/wallpaper_widget_controller.cc |
diff --git a/ash/wallpaper/wallpaper_widget_controller.cc b/ash/wallpaper/wallpaper_widget_controller.cc |
index 736ac1320eba932119010556c3ecb58afb751735..ecedde72289ecea62f74321226049461f911ef31 100644 |
--- a/ash/wallpaper/wallpaper_widget_controller.cc |
+++ b/ash/wallpaper/wallpaper_widget_controller.cc |
@@ -8,7 +8,7 @@ |
#include "ash/root_window_controller.h" |
#include "ash/shell.h" |
#include "ash/wallpaper/wallpaper_delegate.h" |
-#include "ash/wm_window.h" |
+#include "ui/aura/window.h" |
#include "ui/compositor/layer_animation_observer.h" |
#include "ui/compositor/scoped_layer_animation_settings.h" |
#include "ui/views/widget/widget.h" |
@@ -62,11 +62,10 @@ class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver, |
} // namespace |
WallpaperWidgetController::WallpaperWidgetController(views::Widget* widget) |
- : widget_(widget), |
- widget_parent_(WmWindow::Get(widget->GetNativeWindow())->GetParent()) { |
+ : widget_(widget), widget_parent_(widget->GetNativeWindow()->parent()) { |
DCHECK(widget_); |
widget_->AddObserver(this); |
- widget_parent_->aura_window()->AddObserver(this); |
+ widget_parent_->AddObserver(this); |
} |
WallpaperWidgetController::~WallpaperWidgetController() { |
@@ -86,13 +85,14 @@ void WallpaperWidgetController::SetBounds(const gfx::Rect& bounds) { |
widget_->SetBounds(bounds); |
} |
-bool WallpaperWidgetController::Reparent(WmWindow* root_window, int container) { |
+bool WallpaperWidgetController::Reparent(aura::Window* root_window, |
+ int container) { |
if (widget_) { |
- widget_parent_->aura_window()->RemoveObserver(this); |
- WmWindow* window = WmWindow::Get(widget_->GetNativeWindow()); |
- root_window->GetChildByShellWindowId(container)->AddChild(window); |
- widget_parent_ = WmWindow::Get(widget_->GetNativeWindow())->GetParent(); |
- widget_parent_->aura_window()->AddObserver(this); |
+ widget_parent_->RemoveObserver(this); |
+ aura::Window* window = widget_->GetNativeWindow(); |
+ root_window->GetChildById(container)->AddChild(window); |
+ widget_parent_ = widget_->GetNativeWindow()->parent(); |
+ widget_parent_->AddObserver(this); |
return true; |
} |
// Nothing to reparent. |
@@ -100,7 +100,7 @@ bool WallpaperWidgetController::Reparent(WmWindow* root_window, int container) { |
} |
void WallpaperWidgetController::RemoveObservers() { |
- widget_parent_->aura_window()->RemoveObserver(this); |
+ widget_parent_->RemoveObserver(this); |
widget_->RemoveObserver(this); |
widget_ = nullptr; |
} |