WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
146660
Media Session: propagate metadata changes to UI clients
https://bugs.webkit.org/show_bug.cgi?id=146660
Summary
Media Session: propagate metadata changes to UI clients
Matt Rajca
Reported
2015-07-06 16:24:13 PDT
We need to give UI clients a chance to handle media metadata changes.
Attachments
Patch
(28.95 KB, patch)
2015-07-06 16:46 PDT
,
Matt Rajca
no flags
Details
Formatted Diff
Diff
Patch
(28.95 KB, patch)
2015-07-06 16:50 PDT
,
Matt Rajca
no flags
Details
Formatted Diff
Diff
Patch
(28.93 KB, patch)
2015-07-07 10:25 PDT
,
Matt Rajca
no flags
Details
Formatted Diff
Diff
Patch
(28.81 KB, patch)
2015-07-07 13:24 PDT
,
Matt Rajca
thorton
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2015-07-06 16:25:01 PDT
<
rdar://problem/21694290
>
Matt Rajca
Comment 2
2015-07-06 16:46:34 PDT
Created
attachment 256255
[details]
Patch
Matt Rajca
Comment 3
2015-07-06 16:50:56 PDT
Created
attachment 256258
[details]
Patch
Eric Carlson
Comment 4
2015-07-07 06:39:28 PDT
Comment on
attachment 256258
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=256258&action=review
> Source/WebKit2/Shared/WebMediaSessionMetadata.cpp:38 > +PassRefPtr<WebMediaSessionMetadata> WebMediaSessionMetadata::create(const MediaSessionMetadata& metadata) > +{ > + return adoptRef(new WebMediaSessionMetadata(metadata)); > +}
The return type should be Ref<WebMediaSessionMetadata>, not PassRefPtr<WebMediaSessionMetadata>. See
http://www.webkit.org/coding/RefPtr.html
.
Matt Rajca
Comment 5
2015-07-07 10:25:43 PDT
Created
attachment 256308
[details]
Patch
Matt Rajca
Comment 6
2015-07-07 10:26:07 PDT
(In reply to
comment #4
)
> Comment on
attachment 256258
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=256258&action=review
> > > Source/WebKit2/Shared/WebMediaSessionMetadata.cpp:38 > > +PassRefPtr<WebMediaSessionMetadata> WebMediaSessionMetadata::create(const MediaSessionMetadata& metadata) > > +{ > > + return adoptRef(new WebMediaSessionMetadata(metadata)); > > +} > > The return type should be Ref<WebMediaSessionMetadata>, not > PassRefPtr<WebMediaSessionMetadata>. See >
http://www.webkit.org/coding/RefPtr.html
.
Fixed.
Tim Horton
Comment 7
2015-07-07 11:27:42 PDT
Comment on
attachment 256308
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=256308&action=review
> Source/WebKit2/UIProcess/API/APIUIClient.h:61 > +#if ENABLE(MEDIA_SESSION)
no need to guard this forward-declaration (but it's fine either way)
> Source/WebKit2/UIProcess/API/C/WKAPICast.h:112 > +#if ENABLE(MEDIA_SESSION)
ditto
> Source/WebKit2/UIProcess/API/C/WKAPICast.h:171 > +WK_ADD_API_MAPPING(WKMediaSessionMetadataRef, WebMediaSessionMetadata)
Why is this mapping #if'd out if WKMediaSessionMetadata has all the functions but the contents of said functions are if'd out? Which way are you disabling this?
Matt Rajca
Comment 8
2015-07-07 13:21:18 PDT
(In reply to
comment #7
)
> Comment on
attachment 256308
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=256308&action=review
> > > Source/WebKit2/UIProcess/API/APIUIClient.h:61 > > +#if ENABLE(MEDIA_SESSION) > > no need to guard this forward-declaration (but it's fine either way)
I think I'll leave it in.
> > > Source/WebKit2/UIProcess/API/C/WKAPICast.h:112 > > +#if ENABLE(MEDIA_SESSION) > > ditto > > > Source/WebKit2/UIProcess/API/C/WKAPICast.h:171 > > +WK_ADD_API_MAPPING(WKMediaSessionMetadataRef, WebMediaSessionMetadata) > > Why is this mapping #if'd out if WKMediaSessionMetadata has all the > functions but the contents of said functions are if'd out? Which way are you > disabling this?
The contents of the functions have to be #if'd out since it doesn't seem like we can use #if ENABLE in those header files. I can remove the #if guards around the mapping.
Matt Rajca
Comment 9
2015-07-07 13:24:12 PDT
Created
attachment 256318
[details]
Patch
Tim Horton
Comment 10
2015-07-07 13:45:57 PDT
(In reply to
comment #8
)
> (In reply to
comment #7
) > > Comment on
attachment 256308
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=256308&action=review
> > > > > Source/WebKit2/UIProcess/API/APIUIClient.h:61 > > > +#if ENABLE(MEDIA_SESSION) > > > > no need to guard this forward-declaration (but it's fine either way) > > I think I'll leave it in.
That's fine! I only noted this because Darin has previously called this practice "overkill" (see
https://bugs.webkit.org/show_bug.cgi?id=134461#c6
).
> > Why is this mapping #if'd out if WKMediaSessionMetadata has all the > > functions but the contents of said functions are if'd out? Which way are you > > disabling this? > > The contents of the functions have to be #if'd out since it doesn't seem > like we can use #if ENABLE in those header files. I can remove the #if > guards around the mapping.
That's what I was hoping you'd do :)
Tim Horton
Comment 11
2015-07-07 13:49:56 PDT
Comment on
attachment 256318
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=256318&action=review
> Source/WebKit2/UIProcess/API/C/WKMediaSessionMetadata.cpp:49 > + return 0;
These should be nullptr, not 0, I think?
> Source/WebKit2/UIProcess/API/C/WKPageUIClient.h:456 > + WKPageMediaSessionMetadataDidChangeCallback mediaSessionMetadataDidChange;
Please make sure that it's OK to add this without bumping the version number and that you do everything necessary to not break internal builds because of it.
Matt Rajca
Comment 12
2015-07-07 14:13:30 PDT
(In reply to
comment #11
)
> Comment on
attachment 256318
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=256318&action=review
> > > Source/WebKit2/UIProcess/API/C/WKMediaSessionMetadata.cpp:49 > > + return 0; > > These should be nullptr, not 0, I think?
Fixed. Not sure why we were using 0 in other WK* sources.
> > > Source/WebKit2/UIProcess/API/C/WKPageUIClient.h:456 > > + WKPageMediaSessionMetadataDidChangeCallback mediaSessionMetadataDidChange; > > Please make sure that it's OK to add this without bumping the version number > and that you do everything necessary to not break internal builds because of > it.
I'll watch the bots. Looks like Brady added a few callbacks last month and things were okay.
Matt Rajca
Comment 13
2015-07-07 16:55:05 PDT
Committed
r186484
: <
http://trac.webkit.org/changeset/186484
>
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