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

Unified Diff: ash/wm/window_resizer.cc

Issue 9455063: Makes windows scale slightly when dragging the caption. Also wired (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixes tests Created 8 years, 10 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/window_resizer.h ('k') | ash/wm/workspace/workspace_window_resizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/window_resizer.cc
diff --git a/ash/wm/window_resizer.cc b/ash/wm/window_resizer.cc
index fbb523ca1241df416bbce85f23ac8221cf7c0a6e..e2838e989209101cb0f6b81b14bce3a301787fd5 100644
--- a/ash/wm/window_resizer.cc
+++ b/ash/wm/window_resizer.cc
@@ -222,6 +222,13 @@ void WindowResizer::CompleteDrag() {
window_->SetBounds(new_bounds);
}
+void WindowResizer::RevertDrag() {
+ if (!did_move_or_resize_)
+ return;
+
+ window_->SetBounds(initial_bounds_);
+}
+
gfx::Rect WindowResizer::GetBoundsForDrag(const gfx::Point& location) {
if (!is_resizable())
return window_->bounds();
« no previous file with comments | « ash/wm/window_resizer.h ('k') | ash/wm/workspace/workspace_window_resizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698