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

Unified Diff: ash/wm/default_window_resizer.cc

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/default_window_resizer.h ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/default_window_resizer.cc
diff --git a/ash/wm/default_window_resizer.cc b/ash/wm/default_window_resizer.cc
index ac0042d000e9482149de1b1fd50a7d5c4ee8f234..cf4159522c8ebb020fd7020bf9acdf8f3da814f8 100644
--- a/ash/wm/default_window_resizer.cc
+++ b/ash/wm/default_window_resizer.cc
@@ -4,20 +4,14 @@
#include "ash/wm/default_window_resizer.h"
-#include "ash/shell.h"
+#include "ash/wm/common/wm_globals.h"
+#include "ash/wm/common/wm_window.h"
#include "ash/wm/window_state.h"
-#include "ui/aura/client/aura_constants.h"
-#include "ui/aura/env.h"
-#include "ui/aura/window.h"
-#include "ui/aura/window_delegate.h"
-#include "ui/base/hit_test.h"
-#include "ui/base/ui_base_types.h"
-#include "ui/gfx/screen.h"
namespace ash {
DefaultWindowResizer::~DefaultWindowResizer() {
- ash::Shell::GetInstance()->cursor_manager()->UnlockCursor();
+ globals_->UnlockCursor();
}
// static
@@ -28,7 +22,7 @@ DefaultWindowResizer::Create(wm::WindowState* window_state) {
void DefaultWindowResizer::Drag(const gfx::Point& location, int event_flags) {
gfx::Rect bounds(CalculateBoundsForDrag(location));
- if (bounds != GetTarget()->bounds()) {
+ if (bounds != GetTarget()->GetBounds()) {
if (!did_move_or_resize_ && !details().restore_bounds.IsEmpty())
window_state_->ClearRestoreBounds();
did_move_or_resize_ = true;
@@ -51,9 +45,10 @@ void DefaultWindowResizer::RevertDrag() {
DefaultWindowResizer::DefaultWindowResizer(wm::WindowState* window_state)
: WindowResizer(window_state),
- did_move_or_resize_(false) {
+ did_move_or_resize_(false),
+ globals_(GetTarget()->GetGlobals()) {
DCHECK(details().is_resizable);
- ash::Shell::GetInstance()->cursor_manager()->LockCursor();
+ globals_->LockCursor();
}
} // namespace aura
« no previous file with comments | « ash/wm/default_window_resizer.h ('k') | ash/wm/dock/docked_window_layout_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698