Implement swipe-to-dismiss for PIP windows.

in the direction of initial movement and then locked on the axis
off-screen and didn't dismiss if not.
off-screen.
screen doesn't allow a swipe-to-dismiss to initiate.
the screen correctly disables initiation of another swipe-to-dismiss for
the rest of the drag-to-move.

Bug: 883114
Bug: 841886
Bug: b/115291749
Test: Added unittests
Test: tried swipe-to-dismiss from all four corners, it started swiping
Test: Tried swiping on the edges of the screen
Test: Tried swiping around 50% area - correctly dismissed if >50% area
Test: Popped back after swiping out with less than 50% of the area
Test: Starting drag-to-move while not on the edge or corner of the
Test: Starting to swipe-to-dismiss but then dragging into the middle of
Change-Id: I350a8824a0d21162f7356a01632cd4787bd0392c
Reviewed-on: https://chromium-review.googlesource.com/c/1221646
Commit-Queue: Eliot Courtney <edcourtney@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Cr-Commit-Position: refs/heads/master@{#604524}
3 files changed