| Index: ash/wm/gestures/system_pinch_handler.cc
|
| diff --git a/ash/wm/gestures/system_pinch_handler.cc b/ash/wm/gestures/system_pinch_handler.cc
|
| index a0f5d12e00b04642df7a0f6a552d6e5dd80ac397..6a27146cc7fc885cdb0ab94d70c455e38919d25c 100644
|
| --- a/ash/wm/gestures/system_pinch_handler.cc
|
| +++ b/ash/wm/gestures/system_pinch_handler.cc
|
| @@ -11,7 +11,6 @@
|
| #include "ash/wm/property_util.h"
|
| #include "ash/wm/window_animations.h"
|
| #include "ash/wm/window_util.h"
|
| -#include "ash/wm/workspace/snap_sizer.h"
|
| #include "ui/aura/window.h"
|
| #include "ui/base/events/event_constants.h"
|
| #include "ui/base/gestures/gesture_types.h"
|
| @@ -86,15 +85,19 @@ SystemGestureStatus SystemPinchHandler::ProcessGestureEvent(
|
|
|
| if (event.details().swipe_left() || event.details().swipe_right()) {
|
| // Snap for left/right swipes.
|
| - ui::ScopedLayerAnimationSettings settings(
|
| - target_->layer()->GetAnimator());
|
| - internal::SnapSizer::SnapWindow(target_,
|
| - event.details().swipe_left() ? internal::SnapSizer::LEFT_EDGE :
|
| - internal::SnapSizer::RIGHT_EDGE);
|
| + if (wm::CanSnapWindow(target_)) {
|
| + ui::ScopedLayerAnimationSettings settings(
|
| + target_->layer()->GetAnimator());
|
| + wm::SnapWindowToEdge(target_,
|
| + event.details().swipe_left() ? wm::SNAP_LEFT_EDGE :
|
| + wm::SNAP_RIGHT_EDGE);
|
| + }
|
| } else if (event.details().swipe_up()) {
|
| if (!wm::IsWindowMaximized(target_) &&
|
| - !wm::IsWindowFullscreen(target_))
|
| + !wm::IsWindowFullscreen(target_) &&
|
| + wm::CanMaximizeWindow(target_)) {
|
| wm::MaximizeWindow(target_);
|
| + }
|
| } else if (event.details().swipe_down()) {
|
| wm::MinimizeWindow(target_);
|
| } else {
|
|
|