• Luciano Pacheco's avatar
    Files app, Gallery, Audio and Video Players: Refactor getting · b6d1d101
    Luciano Pacheco authored
    VolumeManager from background page
    
    Refactor FilteredVolumeManager() to not depend or reach to the
    background window/page, instead it just receives a promise that resolves
    to the `VolumeManager` which is what `FilteredVolumeManager()` needs.
    
    This is a preparation for JS modules to avoid the foreground using
    global variables from the background, this case is avoiding the
    `volumeManagerFactory` from FilteredVolumeManager().
    
    For the SWA is the same concept, centralize the interaction with
    background page via the `BackgroundPage` interface.
    
    No change in the behavior, so Closure and current tests cover this.
    
    Bug: 1148545, 1133186, 1113981
    Change-Id: I81b87534b26d10946dfa1dc0e287c63f003ea203
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2534553
    Commit-Queue: Luciano Pacheco <lucmult@chromium.org>
    Commit-Queue: Noel Gordon <noel@chromium.org>
    Reviewed-by: default avatarNoel Gordon <noel@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#827175}
    b6d1d101
audio_player.js 21.1 KB