WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146282
MediaSession: propagate MediaSessionMetadata to WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=146282
Summary
MediaSession: propagate MediaSessionMetadata to WebPageProxy
Matt Rajca
Reported
2015-06-24 09:59:00 PDT
Propagate changes to MediaSessionMetadata to WebPageProxy for clients to ultimately respond to.
Attachments
Patch
(10.28 KB, patch)
2015-06-24 10:15 PDT
,
Matt Rajca
no flags
Details
Formatted Diff
Diff
Patch
(10.28 KB, patch)
2015-06-24 10:49 PDT
,
Matt Rajca
darin
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-06-24 09:59:41 PDT
<
rdar://problem/21525952
>
Matt Rajca
Comment 2
2015-06-24 10:15:09 PDT
Created
attachment 255489
[details]
Patch
Eric Carlson
Comment 3
2015-06-24 10:19:32 PDT
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".
Matt Rajca
Comment 4
2015-06-24 10:32:32 PDT
(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.
Matt Rajca
Comment 5
2015-06-24 10:49:47 PDT
Created
attachment 255491
[details]
Patch
Darin Adler
Comment 6
2015-06-24 14:58:10 PDT
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.
Tim Horton
Comment 7
2015-06-24 14:58:54 PDT
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.
Matt Rajca
Comment 8
2015-06-24 15:31:07 PDT
(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.
Matt Rajca
Comment 9
2015-06-24 15:32:18 PDT
(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!
Matt Rajca
Comment 10
2015-06-24 15:39:12 PDT
Committed
r185929
: <
http://trac.webkit.org/changeset/185929
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug