Move Viewport reset into DirectManipulationEventHandler

The crash report shows DirectManipulation may call
DirectManipulationEventHandler OnViewportStatusChanged
to READY state after DirectManipulationHelper Destroyed
then crash because we called Reset to invalidate DMHelper.

In this CL, we pass the viewport size to DMEventHandler
and use it to reset viewport at gesture end. Also
DMEventHandler does not need to store pointer of DMHelper.

Bug: 951293
Change-Id: I39a3402659b9ae117ab45288b68dd5d595e58457
Commit-Queue: Jianpeng Chao <>
Reviewed-by: Scott Violet <>
Cr-Commit-Position: refs/heads/master@{#649712}
4 files changed