• Sammie Quon's avatar
    shelf: Clicking shelf items will open windows on the display with click. · e7c1da1d
    Sammie Quon authored
    Currently works on browser windows due to ScopedRootForNewWindows due
    to opening sync (or before AfterItemSelected callback is fired). V1 and
    V2 apps are launched async though.
    
    This moves deleting the scoped object until ShelfItemStatusChanged
    which can be called by window activation change, which is async. It's
    a little worrisome that we might not clear the changed root window so
    added a delayed task to ensure deletion (when I tested window
    activation always happened though).
    
    Tried adding a test in ChromeLauncherControllerTest but it doesn't seem
    like there was support for launching a app in a separate window, even
    by launching manually and not clicking on the shelf shortcut.
    
    Test: manual
    Bug: 1080390
    Change-Id: I0d5f6126571f92d86c5d4530d205b6cfc3e635be
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2198550Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Commit-Queue: Sammie Quon <sammiequon@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#768528}
    e7c1da1d
shelf_view.h 25.7 KB