• zqzhang's avatar
    [MediaSession] A fix for MediaSessionService routing · 7f5596e8
    zqzhang authored
    Previously, MediaSessionImpl uses the metadata and controls to determine
    whether a page uses the MediaSession API. However there comes an issues
    that we need to update the routed MediaSession every time when a service
    is created/destroyed or its metadata/controls changed, which is a lot of
    maintainance work.
    
    This CL simplifies the MediaSessionService routing strategy. It only
    checks whether a service is created for a given frame. The rationale is
    that a MediaSessionService is created when and only when anything passes
    through mojo, which is enough for indicating whether a frame uses
    MediaSession API.
    
    BUG=670319
    
    Review-Url: https://codereview.chromium.org/2585243002
    Cr-Commit-Position: refs/heads/master@{#439488}
    7f5596e8
media_session_impl.cc 21 KB