Bug 1414680 - Remove IsActive() and IsHidden() from MediaDecoderOwner as they're unused by MediaDecoder. r?jwwang
MozReview-Commit-ID: 7NaPBmQJVQC
--- a/dom/html/HTMLMediaElement.h
+++ b/dom/html/HTMLMediaElement.h
@@ -216,19 +216,19 @@ public:
// Called to indicate the download is progressing.
virtual void DownloadProgressed() final override;
// Called by the media decoder to indicate whether the media cache has
// suspended the channel.
virtual void NotifySuspendedByCache(bool aSuspendedByCache) final override;
- virtual bool IsActive() const final override;
+ bool IsActive() const;
- virtual bool IsHidden() const final override;
+ bool IsHidden() const;
// Called by the media decoder and the video frame to get the
// ImageContainer containing the video data.
virtual VideoFrameContainer* GetVideoFrameContainer() final override;
layers::ImageContainer* GetImageContainer();
/**
* Call this to reevaluate whether we should start/stop due to our owner
--- a/dom/media/MediaDecoderOwner.h
+++ b/dom/media/MediaDecoderOwner.h
@@ -113,22 +113,16 @@ public:
// The next frame of audio/video is unavailable for the decoder is seeking.
NEXT_FRAME_UNAVAILABLE_SEEKING,
// The next frame of audio/video is unavailable for some other reasons
NEXT_FRAME_UNAVAILABLE,
// Sentinel value
NEXT_FRAME_UNINITIALIZED
};
- // Check if the decoder owner is active.
- virtual bool IsActive() const = 0;
-
- // Check if the decoder owner is hidden.
- virtual bool IsHidden() const = 0;
-
// Called by media decoder when the audible state changed
virtual void SetAudibleState(bool aAudible) = 0;
// Notified by the decoder that XPCOM shutdown has begun.
// The decoder owner should call Shutdown() on the decoder and drop the
// reference to the decoder to prevent further calls into the decoder.
virtual void NotifyXPCOMShutdown() = 0;
--- a/dom/media/gtest/MockMediaDecoderOwner.h
+++ b/dom/media/gtest/MockMediaDecoderOwner.h
@@ -31,18 +31,16 @@ public:
void PlaybackEnded() override {}
void SeekStarted() override {}
void SeekCompleted() override {}
void DownloadProgressed() override {}
void UpdateReadyState() override {}
void FirstFrameLoaded() override {}
void DispatchEncrypted(const nsTArray<uint8_t>& aInitData,
const nsAString& aInitDataType) override {}
- bool IsActive() const override { return true; }
- bool IsHidden() const override { return false; }
void DownloadSuspended() override {}
void DownloadResumed(bool aForceNetworkLoading) override {}
void NotifySuspendedByCache(bool aIsSuspended) override {}
void NotifyDecoderPrincipalChanged() override {}
void SetAudibleState(bool aAudible) override {}
void NotifyXPCOMShutdown() override {}
AbstractThread* AbstractMainThread() const override
{