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

Unified Diff: ash/wm/immersive_context_ash.cc

Issue 2907853002: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (Closed)
Patch Set: [mus+ash] Removes WmWindow from ash/shelf and ash/shell (removed some more wm_window.h) 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/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/lock_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/immersive_context_ash.cc
diff --git a/ash/wm/immersive_context_ash.cc b/ash/wm/immersive_context_ash.cc
index 3211651337c1cdfe5d79febd7c72b5d2e5ef97b4..7b28828c76a978e5fdc729c6a9c5fa48ebab46a8 100644
--- a/ash/wm/immersive_context_ash.cc
+++ b/ash/wm/immersive_context_ash.cc
@@ -8,9 +8,9 @@
#include "ash/shelf/shelf.h"
#include "ash/shell.h"
#include "ash/shell_port.h"
+#include "ash/wm/resize_handle_window_targeter.h"
#include "ash/wm/window_state.h"
#include "ash/wm/window_util.h"
-#include "ash/wm_window.h"
#include "base/logging.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
@@ -24,15 +24,16 @@ ImmersiveContextAsh::~ImmersiveContextAsh() {}
void ImmersiveContextAsh::InstallResizeHandleWindowTargeter(
ImmersiveFullscreenController* controller) {
- WmWindow* window = WmWindow::Get(controller->widget()->GetNativeWindow());
- window->InstallResizeHandleWindowTargeter(controller);
+ aura::Window* window = controller->widget()->GetNativeWindow();
+ window->SetEventTargeter(
+ base::MakeUnique<ResizeHandleWindowTargeter>(window, controller));
}
void ImmersiveContextAsh::OnEnteringOrExitingImmersive(
ImmersiveFullscreenController* controller,
bool entering) {
- WmWindow* window = WmWindow::Get(controller->widget()->GetNativeWindow());
- wm::WindowState* window_state = window->GetWindowState();
+ aura::Window* window = controller->widget()->GetNativeWindow();
+ wm::WindowState* window_state = wm::GetWindowState(window);
// Auto hide the shelf in immersive fullscreen instead of hiding it.
window_state->set_hide_shelf_when_fullscreen(!entering);
// Update the window's immersive mode state for the window manager.
@@ -43,8 +44,10 @@ void ImmersiveContextAsh::OnEnteringOrExitingImmersive(
}
gfx::Rect ImmersiveContextAsh::GetDisplayBoundsInScreen(views::Widget* widget) {
- WmWindow* window = WmWindow::Get(widget->GetNativeWindow());
- return window->GetDisplayNearestWindow().bounds();
+ display::Display display =
+ display::Screen::GetScreen()->GetDisplayNearestWindow(
+ widget->GetNativeWindow());
+ return display.bounds();
}
void ImmersiveContextAsh::AddPointerWatcher(
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/lock_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698