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

Unified Diff: ash/wm/drag_window_resizer.cc

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dock with zero width (rebase) Created 7 years, 6 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.h ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/drag_window_resizer.cc
diff --git a/ash/wm/drag_window_resizer.cc b/ash/wm/drag_window_resizer.cc
index b3b4228d55e3c9883c313d3bb0be622671c757c4..ca332b95f7f4932ce19e8adb3bc3af519051c479 100644
--- a/ash/wm/drag_window_resizer.cc
+++ b/ash/wm/drag_window_resizer.cc
@@ -44,13 +44,18 @@ aura::RootWindow* GetAnotherRootWindow(aura::RootWindow* root_window) {
return root_windows[0];
}
-}
+} // namespace
+
+// static
+DragWindowResizer* DragWindowResizer::instance_ = NULL;
DragWindowResizer::~DragWindowResizer() {
Shell* shell = Shell::GetInstance();
shell->mouse_cursor_filter()->set_mouse_warp_mode(
MouseCursorEventFilter::WARP_ALWAYS);
shell->mouse_cursor_filter()->HideSharedEdgeIndicator();
+ if (instance_ == this)
+ instance_ = NULL;
if (destroyed_)
*destroyed_ = true;
@@ -127,6 +132,10 @@ aura::Window* DragWindowResizer::GetTarget() {
return next_window_resizer_->GetTarget();
}
+const gfx::Point& DragWindowResizer::GetInitialLocation() const {
+ return details_.initial_location_in_parent;
+}
+
DragWindowResizer::DragWindowResizer(WindowResizer* next_window_resizer,
const Details& details)
: next_window_resizer_(next_window_resizer),
@@ -146,6 +155,7 @@ DragWindowResizer::DragWindowResizer(WindowResizer* next_window_resizer,
mouse_cursor_filter->ShowSharedEdgeIndicator(
details.window->GetRootWindow());
}
+ instance_ = this;
}
void DragWindowResizer::UpdateDragWindow(const gfx::Rect& bounds,
« no previous file with comments | « ash/wm/drag_window_resizer.h ('k') | ash/wm/drag_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698