<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Add stub implementation of MediaSession, part of Media Session spec"
href="https://bugs.webkit.org/show_bug.cgi?id=145530#c4">Comment # 4</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Add stub implementation of MediaSession, part of Media Session spec"
href="https://bugs.webkit.org/show_bug.cgi?id=145530">bug 145530</a>
from <span class="vcard"><a class="email" href="mailto:mrajca@apple.com" title="Matt Rajca <mrajca@apple.com>"> <span class="fn">Matt Rajca</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=254028&action=diff" name="attach_254028" title="Patch">attachment 254028</a> <a href="attachment.cgi?id=254028&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=254028&action=review">https://bugs.webkit.org/attachment.cgi?id=254028&action=review</a>
<span class="quote">>> Source/WebCore/Modules/mediasession/MediaSession.h:32
>> +#include <wtf/RefCounted.h>
>
> If we include "MediaRemoteControls.h" it seems unlikely we need to include this also.</span >
Removed.
<span class="quote">>> Source/WebCore/Modules/mediasession/MediaSession.h:37
>> +class MediaSession : public RefCounted<MediaSession> {
>
> I suggest marking this class final.</span >
I agree.
<span class="quote">>> Source/WebCore/Modules/mediasession/MediaSession.h:46
>> + MediaSession(ScriptExecutionContext&, Kind);
>
> Does this compile? Does the bindings generator really turn those strings into MediaSession::Kind values?</span >
Not if we compile JSMediaSession with the project. Fixed.
<span class="quote">>> Source/WebCore/Modules/mediasession/MediaSession.h:47
>> + virtual ~MediaSession();
>
> Why virtual? There doesn’t seem to be any polymorphism in this class, so it seems we should avoid marking it virtual.</span >
Done, and annotated the interface in the IDL file with ImplementationLacksVTable.
<span class="quote">>> Source/WebCore/Modules/mediasession/MediaSession.h:50
>> + MediaRemoteControls *controls() const { return m_controls.get(); }
>
> Wrong position of the * character here.</span >
Fixed.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>