| Summary: | Move management of RemoteCommandListener from MediaSessionManagerCocoa into NowPlayingManager | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||||||
| Component: | Media | Assignee: | Jean-Yves Avenard [:jya] <jean-yves.avenard> | ||||||||
| Status: | RESOLVED FIXED | ||||||||||
| Severity: | Normal | CC: | eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, webkit-bug-importer | ||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||
| Version: | WebKit Nightly Build | ||||||||||
| Hardware: | Unspecified | ||||||||||
| OS: | Unspecified | ||||||||||
| Bug Depends on: | |||||||||||
| Bug Blocks: | 223298 | ||||||||||
| Attachments: |
|
||||||||||
|
Description
Jean-Yves Avenard [:jya]
2021-03-18 03:37:27 PDT
Created attachment 423809 [details]
Patch
Created attachment 423814 [details]
Patch
Comment on attachment 423814 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423814&action=review > Source/WebCore/platform/NowPlayingManager.cpp:65 > + m_setAsNowPlayingApplication = false; Do we need both `m_nowPlayingInfo` and `m_setAsNowPlayingApplication` now - couldn't we clear `m_nowPlayingInfo` here and check `!m_nowPlayingInfo` where we currently check `m_setAsNowPlayingApplication`? > Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp:390 > + // FIXME: Eric, why is this call needed? This will reset the seek information from the one set in setNowPlayingInfo > updateSupportedRemoteCommands(); It is needed if we are just switched to a different element, which may have a different set of supported commands. Comment on attachment 423814 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=423814&action=review >> Source/WebCore/platform/NowPlayingManager.cpp:65 >> + m_setAsNowPlayingApplication = false; > > Do we need both `m_nowPlayingInfo` and `m_setAsNowPlayingApplication` now - couldn't we clear `m_nowPlayingInfo` here and check `!m_nowPlayingInfo` where we currently check `m_setAsNowPlayingApplication`? Not with the logic as-is m_setAsNowPlayingApplication is only set after the first call to setNowPlayingInfoPrivate, if we used to just check if m_nowPlayingInfo is set, then we would always pass true to MediaSessionManagerCocoa::setNowPlayingInfo And we need to set m_nowPlayingInfo before calling it as in bug 223298 as the parameter is const. So while we could probably combined the two members, I do feel like it would make the code harder to read. As such, I prefer to leave it as-is. Created attachment 423960 [details]
Patch
remove FIXME question:
Committed r274829: <https://commits.webkit.org/r274829> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423960 [details]. |