diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-22 15:14:53 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2020-04-22 15:14:53 +0200 |
commit | 400e9018fd5b1b8e50ba5ea403ba98f9a658c076 (patch) | |
tree | d43e5e71790e07a7535eab9067ecd72f9881fc53 /dom/media/imagecapture | |
parent | b5b62d841c733dcb62112f3158f1488e670671d6 (diff) | |
download | UXP-400e9018fd5b1b8e50ba5ea403ba98f9a658c076.tar UXP-400e9018fd5b1b8e50ba5ea403ba98f9a658c076.tar.gz UXP-400e9018fd5b1b8e50ba5ea403ba98f9a658c076.tar.lz UXP-400e9018fd5b1b8e50ba5ea403ba98f9a658c076.tar.xz UXP-400e9018fd5b1b8e50ba5ea403ba98f9a658c076.zip |
Revert "Issue #80 - De-unify dom/media part 1"
This reverts commit b5b62d841c733dcb62112f3158f1488e670671d6.
Diffstat (limited to 'dom/media/imagecapture')
-rw-r--r-- | dom/media/imagecapture/CaptureTask.cpp | 18 | ||||
-rw-r--r-- | dom/media/imagecapture/CaptureTask.h | 18 | ||||
-rw-r--r-- | dom/media/imagecapture/moz.build | 2 |
3 files changed, 19 insertions, 19 deletions
diff --git a/dom/media/imagecapture/CaptureTask.cpp b/dom/media/imagecapture/CaptureTask.cpp index 9f1eea9ef..589ba5a42 100644 --- a/dom/media/imagecapture/CaptureTask.cpp +++ b/dom/media/imagecapture/CaptureTask.cpp @@ -15,6 +15,24 @@ namespace mozilla { +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; +}; + CaptureTask::CaptureTask(dom::ImageCapture* aImageCapture) : mImageCapture(aImageCapture) , mEventListener(new MediaStreamEventListener(this)) diff --git a/dom/media/imagecapture/CaptureTask.h b/dom/media/imagecapture/CaptureTask.h index f9c810158..2b4f0a04c 100644 --- a/dom/media/imagecapture/CaptureTask.h +++ b/dom/media/imagecapture/CaptureTask.h @@ -86,24 +86,6 @@ 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 diff --git a/dom/media/imagecapture/moz.build b/dom/media/imagecapture/moz.build index c1a58ff37..f47649c5e 100644 --- a/dom/media/imagecapture/moz.build +++ b/dom/media/imagecapture/moz.build @@ -8,7 +8,7 @@ EXPORTS.mozilla.dom += [ 'ImageCapture.h' ] -SOURCES += [ +UNIFIED_SOURCES += [ 'CaptureTask.cpp', 'ImageCapture.cpp', ] |