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

Unified Diff: ash/wm/gestures/two_finger_drag_handler.cc

Issue 11434004: ash: Refactor some code that snaps windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 1 month 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/gestures/system_pinch_handler.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/gestures/two_finger_drag_handler.cc
diff --git a/ash/wm/gestures/two_finger_drag_handler.cc b/ash/wm/gestures/two_finger_drag_handler.cc
index a450a273d9a9db0446db20ef118ac88da9dd3a59..25076ee1a64dceed7fde431492cdbc09aa86ac6a 100644
--- a/ash/wm/gestures/two_finger_drag_handler.cc
+++ b/ash/wm/gestures/two_finger_drag_handler.cc
@@ -133,17 +133,13 @@ bool TwoFingerDragHandler::ProcessGestureEvent(aura::Window* target,
} else if (event.details().swipe_down()) {
wm::MinimizeWindow(target);
} else {
- internal::SnapSizer sizer(target,
- gfx::Point(),
- event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
- internal::SnapSizer::RIGHT_EDGE,
- internal::SnapSizer::OTHER_INPUT);
-
ui::ScopedLayerAnimationSettings scoped_setter(
target->layer()->GetAnimator());
scoped_setter.SetPreemptionStrategy(
ui::LayerAnimator::REPLACE_QUEUED_ANIMATIONS);
- target->SetBounds(sizer.target_bounds());
+ internal::SnapSizer::SnapWindow(target,
+ event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
+ internal::SnapSizer::RIGHT_EDGE);
}
return true;
}
« no previous file with comments | « ash/wm/gestures/system_pinch_handler.cc ('k') | ash/wm/toplevel_window_event_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698