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

Unified Diff: ash/wm/window_resizer.h

Issue 1898223002: Removes most aura dependencies from WindowResizer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_aura_from_window_state
Patch Set: nit and merge 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/toplevel_window_event_handler.cc ('k') | ash/wm/window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_resizer.h
diff --git a/ash/wm/window_resizer.h b/ash/wm/window_resizer.h
index af7a92c558fcbeddcac9dc083f13bfbb3e50b205..39a47a8b40a3f0a2ed5740bcab7490a2c33f06ca 100644
--- a/ash/wm/window_resizer.h
+++ b/ash/wm/window_resizer.h
@@ -11,14 +11,20 @@
#include "ash/wm/drag_details.h"
#include "ash/wm/window_state.h"
#include "base/macros.h"
-#include "ui/gfx/geometry/rect.h"
#include "ui/wm/public/window_move_client.h"
namespace aura {
class Window;
}
+namespace gfx {
+class Rect;
+}
+
namespace ash {
+namespace wm {
+class WmWindow;
+}
// WindowResizer is used by ToplevelWindowEventFilter to handle dragging, moving
// or resizing a window. All coordinates passed to this are in the parent
@@ -35,7 +41,7 @@ class ASH_EXPORT WindowResizer {
static const int kBoundsChangeDirection_Horizontal;
static const int kBoundsChangeDirection_Vertical;
- WindowResizer(wm::WindowState* window_state);
+ explicit WindowResizer(wm::WindowState* window_state);
virtual ~WindowResizer();
// Returns a bitmask of the kBoundsChange_ values.
@@ -56,8 +62,13 @@ class ASH_EXPORT WindowResizer {
virtual void RevertDrag() = 0;
// Returns the target window the resizer was created for.
- aura::Window* GetTarget() const {
- return window_state_ ? window_state_->aura_window() : NULL;
+ wm::WmWindow* GetTarget() const {
+ return window_state_ ? window_state_->window() : nullptr;
+ }
+ // Deprecated.
+ // TODO(sky): remove.
+ aura::Window* GetAuraTarget() const {
+ return window_state_ ? window_state_->aura_window() : nullptr;
}
// See comment for |DragDetails::initial_location_in_parent|.
« no previous file with comments | « ash/wm/toplevel_window_event_handler.cc ('k') | ash/wm/window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698