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

Unified Diff: ash/wallpaper/wallpaper_widget_controller.cc

Issue 2908333003: [mus+ash] Removes WmWindow from ash (app_list, frame, metrics, session, system, wallpaper) (Closed)
Patch Set: [mus ash] Removes WmWindow from ash (rebase, nits and cleanup of use of ResizeHandleWindowTargeter) Created 3 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
« no previous file with comments | « ash/wallpaper/wallpaper_widget_controller.h ('k') | ash/wm/immersive_context_ash.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « ash/wallpaper/wallpaper_widget_controller.h ('k') | ash/wm/immersive_context_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698