MacViews: Use the ContrainedWindow animations for MODAL_TYPE_CHILD
commit317862043e80cfd60e81aaeb2d5d028fb65d87a2
authortapted <tapted@chromium.org>
Tue, 2 Jun 2015 23:19:57 +0000 (2 16:19 -0700)
committerCommit bot <commit-bot@chromium.org>
Tue, 2 Jun 2015 23:20:30 +0000 (2 23:20 +0000)
tree5e02a19f3f7031b9c87321048a9489213f589ce9
parentc5eaab1a8e08c488ee6937900b3dd83df52ec2a7
MacViews: Use the ContrainedWindow animations for MODAL_TYPE_CHILD

WindowModal sheets get their animations from Cocoa (and modality is
enforced by Cocoa). The "Child" dialog type is used for
WebContents-modal dialogs and has a custom animation, now in
ui/base/cocoa. (For aura, window animations happen in ui/wm/core). So
for MacViews, these animations can fit at a similar level (i.e. outside
of chrome/browse/ui).

Use a nonblocking (UI-thread) animation for now. It simplifies things,
but complex dialogs might need some extra smarts to coordinate with the
compositor if performance isn't up to scratch on user hardware.

Cocoa animations can outlast the toolkit-views objects involved, so add
a test to cover these flows.

BUG=485854

Review URL: https://codereview.chromium.org/1145373008

Cr-Commit-Position: refs/heads/master@{#332487}
ui/views/cocoa/bridged_native_widget.mm
ui/views/widget/native_widget_mac.h
ui/views/widget/native_widget_mac.mm
ui/views/widget/native_widget_mac_unittest.mm