• Giovanni Ortuño Urquidi's avatar
    desktop-pwas: Set/unset app-specific prefs in TabInsertedAt/TabRemovedAt · dcac90e5
    Giovanni Ortuño Urquidi authored
    WebContents in app windows require certain prefs to be set. This
    happened in OpenApplication, but there are multiple ways for a
    WebContents to end up in an app window and also a WebContents that
    started in an app window could later move to regular tab. So, in some
    cases, a WebContents could end up in an app window without the necessary
    prefs or a WebContents could end up in a regular tab with app prefs set.
    
    Before, when an app window was opened through OpenApplication,
    OpenApplication would set app-specific prefs in the new app's
    WebContents. Now, HostedAppBrowserController sets the prefs when the
    WebContents is added to the tab strip. Before, nothing would unset the
    app-specific prefs when a WebContents was moved from an app window.
    Now, HostedAppBrowserController unsets the prefs when the WebContents
    is detached.
    
    Bug: 808901
    Change-Id: I6b21e7e9090133755d8e45de7a216e4c5a5e1379
    Reviewed-on: https://chromium-review.googlesource.com/958790
    Commit-Queue: Giovanni Ortuño Urquidi <ortuno@chromium.org>
    Reviewed-by: default avatarTrent Apted <tapted@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#544293}
    dcac90e5
hosted_app_browsertest.cc 53.8 KB