<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:eric.carlson@apple.com" title="Eric Carlson <eric.carlson@apple.com>"> <span class="fn">Eric Carlson</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Media Session: notify the UI process when media controls are enabled/disabled"
href="https://bugs.webkit.org/show_bug.cgi?id=147802">bug 147802</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #258684 Flags</td>
<td>review?
</td>
<td>review+
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Media Session: notify the UI process when media controls are enabled/disabled"
href="https://bugs.webkit.org/show_bug.cgi?id=147802#c14">Comment # 14</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Media Session: notify the UI process when media controls are enabled/disabled"
href="https://bugs.webkit.org/show_bug.cgi?id=147802">bug 147802</a>
from <span class="vcard"><a class="email" href="mailto:eric.carlson@apple.com" title="Eric Carlson <eric.carlson@apple.com>"> <span class="fn">Eric Carlson</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=258684&action=diff" name="attach_258684" title="Patch">attachment 258684</a> <a href="attachment.cgi?id=258684&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=258684&action=review">https://bugs.webkit.org/attachment.cgi?id=258684&action=review</a>
<span class="quote">>>> Source/WebCore/Modules/mediasession/MediaSession.cpp:74
>>> + m_controls = adoptRef(*new MediaRemoteControls(context, this));
>>
>> Why doesn't this use MediaRemoteControls::create() (which would need an extra parameter)?
>
> The bindings generator expects only one parameter (the ScriptExecutionContext) so I can't add another one. Since the only case where we need to store a backpointer to the media session is this one, I just create the object directly.</span >
Can't you make a second MediaRemoteControls::create method and use it here? That will also allow you to make the MediaRemoteControls constructor private, which is the preferred pattern when possible in WebKit.</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>