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

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

Issue 2726823003: Remove WmLookup. (Closed)
Patch Set: Clean up include and modify comment. 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_view.cc ('k') | ash/common/wm/container_finder_unittest.cc » ('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 80952ff842b81f819eaf40d3ae33be0fd112cd16..506cea9d4e0be1e987a95edd62d60e6de02e00a9 100644
--- a/ash/common/wallpaper/wallpaper_widget_controller.cc
+++ b/ash/common/wallpaper/wallpaper_widget_controller.cc
@@ -6,7 +6,6 @@
#include "ash/ash_export.h"
#include "ash/common/wallpaper/wallpaper_delegate.h"
-#include "ash/common/wm_lookup.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/root_window_controller.h"
@@ -64,7 +63,7 @@ class ShowWallpaperAnimationObserver : public ui::ImplicitAnimationObserver,
WallpaperWidgetController::WallpaperWidgetController(views::Widget* widget)
: widget_(widget),
- widget_parent_(WmLookup::Get()->GetWindowForWidget(widget)->GetParent()) {
+ widget_parent_(WmWindow::Get(widget->GetNativeWindow())->GetParent()) {
DCHECK(widget_);
widget_->AddObserver(this);
widget_parent_->aura_window()->AddObserver(this);
@@ -90,9 +89,9 @@ void WallpaperWidgetController::SetBounds(const gfx::Rect& bounds) {
bool WallpaperWidgetController::Reparent(WmWindow* root_window, int container) {
if (widget_) {
widget_parent_->aura_window()->RemoveObserver(this);
- WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget_);
+ WmWindow* window = WmWindow::Get(widget_->GetNativeWindow());
root_window->GetChildByShellWindowId(container)->AddChild(window);
- widget_parent_ = WmLookup::Get()->GetWindowForWidget(widget_)->GetParent();
+ widget_parent_ = WmWindow::Get(widget_->GetNativeWindow())->GetParent();
widget_parent_->aura_window()->AddObserver(this);
return true;
}
« no previous file with comments | « ash/common/wallpaper/wallpaper_view.cc ('k') | ash/common/wm/container_finder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698