• Robbie McElrath's avatar
    Reland "[WebLayer] Let the embedder animate top controls in/out." · 8987ba52
    Robbie McElrath authored
    This is a reland of b207aafb
    The original version of this CL would disable animations when destroying
    BrowserControlsContainerView, including the bottom view, which asserted
    that setAnimationsEnabled wasn't called on it. This would fail depending
    on whether or not weblayer's teardown finished before the test finished.
    
    Original change's description:
    > [WebLayer] Let the embedder animate top controls in/out.
    >
    > This CL adds an "animate" flag to Browser.setTopView that allows the
    > embedder to tell WebLayer to animate the top view off the screen when
    > setting it to null, or to animate it down from the top when setting it
    > to a non-null value.
    >
    > The animation off the screen is achieved by removing the View from the
    > view tree, but keeping the bitmap layer in place, hiding the top
    > controls, and then deleting the layer after the animation is complete.
    >
    > Bug: 1108956
    > Change-Id: Idb9bce6c2633ef6d1d369ccb2741ae6fd1fe43a2
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2335800
    > Reviewed-by: Scott Violet <sky@chromium.org>
    > Reviewed-by: Khushal <khushalsagar@chromium.org>
    > Reviewed-by: Bo <boliu@chromium.org>
    > Reviewed-by: David Bokan <bokan@chromium.org>
    > Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#797826}
    
    Bug: 1108956
    Change-Id: I79050b417cf68714061e515cf3ec6433dbbfac6c
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2357369
    Commit-Queue: Robbie McElrath <rmcelrath@chromium.org>
    Reviewed-by: default avatarBo <boliu@chromium.org>
    Reviewed-by: default avatarDavid Bokan <bokan@chromium.org>
    Reviewed-by: default avatarKhushal <khushalsagar@chromium.org>
    Reviewed-by: default avatarSinan Sahin <sinansahin@google.com>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#798992}
    8987ba52
browser_controls_offset_manager.cc 28.9 KB