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

Unified Diff: ash/wm/window_positioner.h

Issue 1900443002: Removes aura dependencies from WindowPositioner (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nuke GetWorkAreaForWindowInParent and fix windows Created 4 years, 8 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/window_positioner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_positioner.h
diff --git a/ash/wm/window_positioner.h b/ash/wm/window_positioner.h
index ad66a7b4fcdacc1b828ce2390db8840fa4335fc1..a4da8dfeaa781407e95cfc6e647490682cdbecc2 100644
--- a/ash/wm/window_positioner.h
+++ b/ash/wm/window_positioner.h
@@ -8,20 +8,17 @@
#include "ash/ash_export.h"
#include "base/macros.h"
#include "ui/base/ui_base_types.h"
-#include "ui/gfx/geometry/rect.h"
-
-namespace aura {
-class Window;
-class RootWindow;
-}
namespace gfx {
class Display;
class Rect;
-class Screen;
}
namespace ash {
+namespace wm {
+class WmGlobals;
+class WmWindow;
+}
namespace test {
class WindowPositionerTest;
@@ -50,8 +47,7 @@ class ASH_EXPORT WindowPositioner {
// |is_saved_bounds| indicates the |bounds_in_out| is the saved
// bounds.
static void GetBoundsAndShowStateForNewWindow(
- const gfx::Screen* screen,
- const aura::Window* new_window,
+ const wm::WmWindow* new_window,
bool is_saved_bounds,
ui::WindowShowState show_state_in,
gfx::Rect* bounds_in_out,
@@ -64,7 +60,7 @@ class ASH_EXPORT WindowPositioner {
// automated desktop location management can be performed and
// rearrange accordingly.
static void RearrangeVisibleWindowOnHideOrRemove(
- const aura::Window* removed_window);
+ const wm::WmWindow* removed_window);
// Turn the automatic positioning logic temporarily off. Returns the previous
// state.
@@ -73,9 +69,9 @@ class ASH_EXPORT WindowPositioner {
// Check if after insertion or showing of the given |added_window|
// an automated desktop location management can be performed and
// rearrange accordingly.
- static void RearrangeVisibleWindowOnShow(aura::Window* added_window);
+ static void RearrangeVisibleWindowOnShow(wm::WmWindow* added_window);
- WindowPositioner();
+ explicit WindowPositioner(wm::WmGlobals* globals);
~WindowPositioner();
// Find a suitable screen position for a popup window and return it. The
@@ -110,6 +106,8 @@ class ASH_EXPORT WindowPositioner {
// Constant exposed for unittest.
static const int kMinimumWindowOffset;
+ wm::WmGlobals* globals_;
+
// The offset in X and Y for the next popup which opens.
int pop_position_offset_increment_x;
int pop_position_offset_increment_y;
« no previous file with comments | « ash/wm/drag_window_resizer_unittest.cc ('k') | ash/wm/window_positioner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698