• nancy's avatar
    Set the correct InstanceState for Chrome. · 686aa0a9
    nancy authored
    When the app_id is empty from web contents, the tab could be an webpage
    without app_id, so set the app_id as Chrome app_id, and set the correct
    InstanceState for Chrome:
    1. When the tab is active, it should be started, running and visible.
    2. When the tab or an app is inactive, it should be started, running.
    
    This CL also fix a crash bug which is caused by AppWindowBase smart
    pointer.
    
    Update AppServiceAppWindowLauncherController and browser_status_monitor
    init order, so when browser status is updated, AppService app window
    can be updated with the function OnInstanceUpdate.
    
    BUG=1011235
    
    Change-Id: Ie5146d44517f844d9bced6812b4c4c6e83930845
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1959191
    Commit-Queue: Nancy Wang <nancylingwang@chromium.org>
    Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
    Reviewed-by: default avatarAga Wronska <agawronska@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#723592}
    686aa0a9
chrome_launcher_controller.cc 55.6 KB