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

Unified Diff: ash/common/wallpaper/wallpaper_widget_controller.cc

Issue 2699033002: Replace WmWindowObserver with aura::WindowObserver. (Closed)
Patch Set: Check for null images in ShelfWindowWatcher. Created 3 years, 10 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/common/wallpaper/wallpaper_widget_controller.h ('k') | ash/common/wm/always_on_top_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wallpaper/wallpaper_widget_controller.cc
diff --git a/ash/common/wallpaper/wallpaper_widget_controller.cc b/ash/common/wallpaper/wallpaper_widget_controller.cc
index b86bf614994b390ab847f70f4b1c4f1b5b7d94d5..80952ff842b81f819eaf40d3ae33be0fd112cd16 100644
--- a/ash/common/wallpaper/wallpaper_widget_controller.cc
+++ b/ash/common/wallpaper/wallpaper_widget_controller.cc
@@ -67,7 +67,7 @@ WallpaperWidgetController::WallpaperWidgetController(views::Widget* widget)
widget_parent_(WmLookup::Get()->GetWindowForWidget(widget)->GetParent()) {
DCHECK(widget_);
widget_->AddObserver(this);
- widget_parent_->AddObserver(this);
+ widget_parent_->aura_window()->AddObserver(this);
}
WallpaperWidgetController::~WallpaperWidgetController() {
@@ -89,11 +89,11 @@ void WallpaperWidgetController::SetBounds(const gfx::Rect& bounds) {
bool WallpaperWidgetController::Reparent(WmWindow* root_window, int container) {
if (widget_) {
- widget_parent_->RemoveObserver(this);
+ widget_parent_->aura_window()->RemoveObserver(this);
WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget_);
root_window->GetChildByShellWindowId(container)->AddChild(window);
widget_parent_ = WmLookup::Get()->GetWindowForWidget(widget_)->GetParent();
- widget_parent_->AddObserver(this);
+ widget_parent_->aura_window()->AddObserver(this);
return true;
}
// Nothing to reparent.
@@ -101,13 +101,13 @@ bool WallpaperWidgetController::Reparent(WmWindow* root_window, int container) {
}
void WallpaperWidgetController::RemoveObservers() {
- widget_parent_->RemoveObserver(this);
+ widget_parent_->aura_window()->RemoveObserver(this);
widget_->RemoveObserver(this);
widget_ = nullptr;
}
void WallpaperWidgetController::OnWindowBoundsChanged(
- WmWindow* window,
+ aura::Window* window,
const gfx::Rect& old_bounds,
const gfx::Rect& new_bounds) {
SetBounds(new_bounds);
« no previous file with comments | « ash/common/wallpaper/wallpaper_widget_controller.h ('k') | ash/common/wm/always_on_top_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698