Delay calling uiDoneClosing until all animations are finished

uiDoneClosing sets the index which does a lot of work, so if we are also
playing an animation during that, the animation quality suffers quite a
bit. With this change, we check whether there are any ongoing layout
animations and postpone the call until the animation finishes.

BUG=960427

Change-Id: I8a37e7cd37a2ec3758c3150d4e2b1715908e4358
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1625839
Commit-Queue: Yusuf Ozuysal <yusufo@chromium.org>
Reviewed-by: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Cr-Commit-Position: refs/heads/master@{#663280}
1 file changed