• Toni Barzic's avatar
    Reland "Better coordinate swipe to home gesture and drag handle nudge" · 7cf9c53c
    Toni Barzic authored
    This is a reland of 57098dce
    
    Original change was crashing asan tests because drag handle was trying
    to remove itself from overview controller observers in it's destructor
    during shell shutdown, and it was getting destructed after the overview
    controller.
    This adds a shell observer, and resets the overview observer sooner,
    when the shell destruction begins.
    
    Original change's description:
    > Better coordinate swipe to home gesture and drag handle nudge
    >
    > Manages the drag handle nudge during window drag from shelf to home or
    > overview (which may end up in a gesture the nudge is describing).
    >
    > If the contextual nudge is shown when the window drag starts, the nudge
    > will not be hidden until the gesture completes (end it will get hidden
    > when the gesture completes, even if the user does not end up going
    > home).
    >
    > If the contextual nudge is scheduled to be shown when the gesture
    > starts, the show request will be canceled.
    >
    > Adds logic that prevents drag handle nudge from showing up, unless it's
    > a result of an explicit user action - tapping the drag handle.
    >
    > BUG=1058617
    >
    > Change-Id: I96fa2748308143ec42295dbfb472dc564da5bd03
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2107135
    > Commit-Queue: Toni Baržić <tbarzic@chromium.org>
    > Reviewed-by: Manu Cornet <manucornet@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#751200}
    
    Bug: 1058617
    Change-Id: I80222105bda946113248f17a93758cec20387ef3
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108629
    Commit-Queue: Toni Baržić <tbarzic@chromium.org>
    Reviewed-by: default avatarManu Cornet <manucornet@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#751468}
    7cf9c53c
shelf_drag_handle_unittest.cc 25.8 KB