RESOLVED FIXED 145523
Media Session API: Implement methods required by the EventTarget interface in MediaRemoteControls
https://bugs.webkit.org/show_bug.cgi?id=145523
Summary Media Session API: Implement methods required by the EventTarget interface in...
Matt Rajca
Reported 2015-06-01 13:47:36 PDT
Implement the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as some required infrastructure.
Attachments
Patch (9.37 KB, patch)
2015-06-01 14:01 PDT, Matt Rajca
no flags
Patch (revised) (9.44 KB, patch)
2015-06-01 14:35 PDT, Matt Rajca
no flags
Radar WebKit Bug Importer
Comment 1 2015-06-01 13:48:44 PDT
Matt Rajca
Comment 2 2015-06-01 14:01:51 PDT
Conrad Shultz
Comment 3 2015-06-01 14:07:04 PDT
Comment on attachment 254012 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254012&action=review > Source/WebCore/ChangeLog:12 > + * Modules/mediasession/MediaRemoteControls.idl: Indicate MediaRemoteControls now takes a constructor that is passed in a script execution context. Event handlers have been uncommented until they are implemented to prevent build errors. I think you meant commented? > Source/WebCore/Modules/mediasession/MediaRemoteControls.idl:40 > + //attribute EventHandler onseekbackward; I think we usually avoid checking in commented-out code. Could this just temporarily be deleted? (If we do commit commented-out code, a comment to make it clear this wasn't an accidental check-in might be warranted.)
Eric Carlson
Comment 4 2015-06-01 14:25:14 PDT
Comment on attachment 254012 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254012&action=review > Source/WebCore/ChangeLog:10 > + Implemented the `eventTargetInterface` and `scriptExecutionContext` methods required by EventTarget, as well as some required infrastructure. > + https://bugs.webkit.org/show_bug.cgi?id=145523 > + > + Reviewed by NOBODY (OOPS!). > + > + * Modules/mediasession/MediaRemoteControls.cpp: > + (WebCore::MediaRemoteControls::MediaRemoteControls): Initialize all instance variables. > + * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented. Please wrap these very long lines to a reasonable window width > Source/WebCore/Modules/mediasession/MediaRemoteControls.cpp:38 > + , m_previousTrackEnabled(false) > + , m_nextTrackEnabled(false) > + , m_seekForwardEnabled(false) > + , m_seekBackwardEnabled(false) These should be initialized in the header with class member initializers, eg: bool m_previousTrackEnabled { false }; etc >> Source/WebCore/Modules/mediasession/MediaRemoteControls.idl:40 >> + //attribute EventHandler onseekbackward; > > I think we usually avoid checking in commented-out code. Could this just temporarily be deleted? (If we do commit commented-out code, a comment to make it clear this wasn't an accidental check-in might be warranted.) Agreed, we generally don't check in commented-out code.
Matt Rajca
Comment 5 2015-06-01 14:35:43 PDT
Created attachment 254014 [details] Patch (revised)
Matt Rajca
Comment 6 2015-06-01 14:36:58 PDT
Comment on attachment 254012 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=254012&action=review >> Source/WebCore/ChangeLog:10 >> + * Modules/mediasession/MediaRemoteControls.h: MediaRemoteControl's constructor now takes a script execution context, which we provide to EventTarget. The required eventTargetInterface method has also been implemented. > > Please wrap these very long lines to a reasonable window width Done. >> Source/WebCore/Modules/mediasession/MediaRemoteControls.cpp:38 >> + , m_seekBackwardEnabled(false) > > These should be initialized in the header with class member initializers, eg: > > bool m_previousTrackEnabled { false }; > > etc Done. >>> Source/WebCore/Modules/mediasession/MediaRemoteControls.idl:40 >>> + //attribute EventHandler onseekbackward; >> >> I think we usually avoid checking in commented-out code. Could this just temporarily be deleted? (If we do commit commented-out code, a comment to make it clear this wasn't an accidental check-in might be warranted.) > > Agreed, we generally don't check in commented-out code. Removed.
WebKit Commit Bot
Comment 7 2015-06-01 15:26:43 PDT
Comment on attachment 254014 [details] Patch (revised) Clearing flags on attachment: 254014 Committed r185077: <http://trac.webkit.org/changeset/185077>
WebKit Commit Bot
Comment 8 2015-06-01 15:26:46 PDT
All reviewed patches have been landed. Closing bug.
Csaba Osztrogonác
Comment 9 2015-09-14 10:55:13 PDT
Comment on attachment 254012 [details] Patch Cleared review? from obsolete attachment 254012 [details] so that this bug does not appear in http://webkit.org/pending-review. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Note You need to log in before you can comment on or make changes to this bug.