| Summary: | MediaSession: propagate MediaSessionMetadata to WebPageProxy | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Matt Rajca <mrajca> | ||||||
| Component: | Media | Assignee: | Nobody <webkit-unassigned> | ||||||
| Status: | RESOLVED FIXED | ||||||||
| Severity: | Normal | CC: | conrad_shultz, eric.carlson, jer.noble, mrajca, webkit-bug-importer | ||||||
| Priority: | P2 | Keywords: | InRadar | ||||||
| Version: | 528+ (Nightly build) | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Bug Depends on: | |||||||||
| Bug Blocks: | 145411 | ||||||||
| Attachments: |
|
||||||||
|
Description
Matt Rajca
2015-06-24 09:59:00 PDT
Created attachment 255489 [details]
Patch
Comment on attachment 255489 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255489&action=review > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:91 > +#import <WebCore/MediaSessionMetadata.h> This (and the one above :-O) should be "#include", not "#import". (In reply to comment #3) > Comment on attachment 255489 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=255489&action=review > > > Source/WebKit2/Shared/WebCoreArgumentCoders.cpp:91 > > +#import <WebCore/MediaSessionMetadata.h> > > This (and the one above :-O) should be "#include", not "#import". Fixed. I filed a separate bug (Bug 146283) for the one above. Created attachment 255491 [details]
Patch
Comment on attachment 255491 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255491&action=review > Source/WebCore/Modules/mediasession/MediaSession.cpp:104 > + m_document.page()->chrome().client().mediaSessionMetadataDidChange(m_metadata); What guarantees that page() is not null here? We should check it for null unless there is an ironclad guarantee it can’t be. > Source/WebCore/page/ChromeClient.h:50 > +#if ENABLE(MEDIA_SESSION) > +#include "MediaSessionMetadata.h" > +#endif We should not include this header. We should be able to just forward-declare MediaSessionMetadata to compile this header. Comment on attachment 255491 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=255491&action=review > Source/WebCore/page/ChromeClient.h:49 > +#include "MediaSessionMetadata.h" Please forward-declare instead of including this header (it seems like you can, right?). ChromeClient.h is included in a billion places and this will just make the build slower. > Source/WebKit2/UIProcess/WebPageProxy.cpp:5775 > +{ I assume you're going to put something here in a near-future patch? > Source/WebKit2/UIProcess/WebPageProxy.h:123 > +#if ENABLE(MEDIA_SESSION) > +#include <WebCore/MediaSessionMetadata.h> Ditto here. (In reply to comment #7) > Comment on attachment 255491 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=255491&action=review > > > Source/WebCore/page/ChromeClient.h:49 > > +#include "MediaSessionMetadata.h" > > Please forward-declare instead of including this header (it seems like you > can, right?). ChromeClient.h is included in a billion places and this will > just make the build slower. Yup, fixed. > > > Source/WebKit2/UIProcess/WebPageProxy.cpp:5775 > > +{ > > I assume you're going to put something here in a near-future patch? Yes. I have the changes locally. > > > Source/WebKit2/UIProcess/WebPageProxy.h:123 > > +#if ENABLE(MEDIA_SESSION) > > +#include <WebCore/MediaSessionMetadata.h> > > Ditto here. Changed. (In reply to comment #6) > Comment on attachment 255491 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=255491&action=review > > > Source/WebCore/Modules/mediasession/MediaSession.cpp:104 > > + m_document.page()->chrome().client().mediaSessionMetadataDidChange(m_metadata); > > What guarantees that page() is not null here? We should check it for null > unless there is an ironclad guarantee it can’t be. Added the null check. > > > Source/WebCore/page/ChromeClient.h:50 > > +#if ENABLE(MEDIA_SESSION) > > +#include "MediaSessionMetadata.h" > > +#endif > > We should not include this header. We should be able to just forward-declare > MediaSessionMetadata to compile this header. Changed. Thanks! Committed r185929: <http://trac.webkit.org/changeset/185929> |