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

Unified Diff: ash/common/wm/window_positioner.cc

Issue 2787363002: Moves couple of WmShell methods to standalone functions (Closed)
Patch Set: feedback and fix applist Created 3 years, 9 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/wm/system_modal_container_layout_manager.cc ('k') | ash/common/wm/window_positioning_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/wm/window_positioner.cc
diff --git a/ash/common/wm/window_positioner.cc b/ash/common/wm/window_positioner.cc
index af2176d9bc45d11bf62bb0b709a65dac8293eceb..c6f0aafcf00cf5ce0b9413501cd12003e0bdc79d 100644
--- a/ash/common/wm/window_positioner.cc
+++ b/ash/common/wm/window_positioner.cc
@@ -11,6 +11,7 @@
#include "ash/common/wm_shell.h"
#include "ash/common/wm_window.h"
#include "ash/shell.h"
+#include "ash/wm/window_util.h"
#include "ui/compositor/layer.h"
#include "ui/display/display.h"
#include "ui/display/screen.h"
@@ -158,7 +159,7 @@ WmWindow* GetReferenceWindow(const WmWindow* root_window,
if (single_window)
*single_window = true;
// Get the active window.
- WmWindow* active = root_window->GetShell()->GetActiveWindow();
+ WmWindow* active = WmWindow::Get(wm::GetActiveWindow());
if (active && active->GetRootWindow() != root_window)
active = NULL;
@@ -418,7 +419,7 @@ gfx::Rect WindowPositioner::GetPopupPosition(const gfx::Rect& old_pos) {
pop_position_offset_increment_y = grid;
// We handle the Multi monitor support by retrieving the active window's
// work area.
- WmWindow* window = WmShell::Get()->GetActiveWindow();
+ WmWindow* window = WmWindow::Get(wm::GetActiveWindow());
const gfx::Rect work_area =
window && window->IsVisible()
? window->GetDisplayNearestWindow().work_area()
« no previous file with comments | « ash/common/wm/system_modal_container_layout_manager.cc ('k') | ash/common/wm/window_positioning_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698