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

Unified Diff: ash/common/wm/immersive_context_ash.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
Index: ash/common/wm/immersive_context_ash.cc
diff --git a/ash/common/wm/immersive_context_ash.cc b/ash/common/wm/immersive_context_ash.cc
index 8b8f9a09aa7076d19ef280b1fcd0382c9ba04d65..c1cff55ec4fd33e1454244250ae8eebc7a3cfbe3 100644
--- a/ash/common/wm/immersive_context_ash.cc
+++ b/ash/common/wm/immersive_context_ash.cc
@@ -6,13 +6,13 @@
#include "ash/common/shelf/wm_shelf.h"
#include "ash/common/wm/window_state.h"
-#include "ash/common/wm_lookup.h"
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/shared/immersive_fullscreen_controller.h"
#include "base/logging.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
+#include "ui/views/widget/widget.h"
namespace ash {
@@ -22,14 +22,14 @@ ImmersiveContextAsh::~ImmersiveContextAsh() {}
void ImmersiveContextAsh::InstallResizeHandleWindowTargeter(
ImmersiveFullscreenController* controller) {
- WmWindow* window = WmLookup::Get()->GetWindowForWidget(controller->widget());
+ WmWindow* window = WmWindow::Get(controller->widget()->GetNativeWindow());
window->InstallResizeHandleWindowTargeter(controller);
}
void ImmersiveContextAsh::OnEnteringOrExitingImmersive(
ImmersiveFullscreenController* controller,
bool entering) {
- WmWindow* window = WmLookup::Get()->GetWindowForWidget(controller->widget());
+ WmWindow* window = WmWindow::Get(controller->widget()->GetNativeWindow());
wm::WindowState* window_state = window->GetWindowState();
// Auto hide the shelf in immersive fullscreen instead of hiding it.
window_state->set_hide_shelf_when_fullscreen(!entering);
@@ -41,7 +41,7 @@ void ImmersiveContextAsh::OnEnteringOrExitingImmersive(
}
gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) {
- WmWindow* window = WmLookup::Get()->GetWindowForWidget(widget);
+ WmWindow* window = WmWindow::Get(widget->GetNativeWindow());
return window->GetDisplayNearestWindow().bounds();
}
« no previous file with comments | « ash/common/wm/dock/docked_window_resizer.cc ('k') | ash/common/wm/maximize_mode/workspace_backdrop_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698