diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-26 12:56:46 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-26 12:56:46 +0200 |
commit | 98fe8b0ccbea37c2681ad8c788baa91554871f4d (patch) | |
tree | 0e269a27661fea619ab07a533e0c1fa195c3c671 /dom/media/imagecapture/CaptureTask.h | |
parent | e08a4ad1c8096fc8de64fac4f36cf0c569cb4420 (diff) | |
parent | 519030e688dd7075a7cd9f14dd6fb9e210b5a689 (diff) | |
download | UXP-98fe8b0ccbea37c2681ad8c788baa91554871f4d.tar UXP-98fe8b0ccbea37c2681ad8c788baa91554871f4d.tar.gz UXP-98fe8b0ccbea37c2681ad8c788baa91554871f4d.tar.lz UXP-98fe8b0ccbea37c2681ad8c788baa91554871f4d.tar.xz UXP-98fe8b0ccbea37c2681ad8c788baa91554871f4d.zip |
Merge branch 'redwood' into 28.9-platformRELBASE_20200426
Diffstat (limited to 'dom/media/imagecapture/CaptureTask.h')
-rw-r--r-- | dom/media/imagecapture/CaptureTask.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dom/media/imagecapture/CaptureTask.h b/dom/media/imagecapture/CaptureTask.h index 2b4f0a04c..f9c810158 100644 --- a/dom/media/imagecapture/CaptureTask.h +++ b/dom/media/imagecapture/CaptureTask.h @@ -86,6 +86,24 @@ protected: bool mPrincipalChanged; }; +class CaptureTask::MediaStreamEventListener : public MediaStreamTrackListener +{ +public: + explicit MediaStreamEventListener(CaptureTask* aCaptureTask) + : mCaptureTask(aCaptureTask) {}; + + // MediaStreamListener methods. + void NotifyEnded() override + { + if(!mCaptureTask->mImageGrabbedOrTrackEnd) { + mCaptureTask->PostTrackEndEvent(); + } + } + +private: + CaptureTask* mCaptureTask; +}; + } // namespace mozilla #endif // CAPTURETASK_H |