diff options
author | Matt A. Tobin <email@mattatobin.com> | 2018-02-23 10:25:15 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2018-02-23 10:29:19 -0500 |
commit | 5513afc0d22151a69dbee6abe6f7655892f4b59e (patch) | |
tree | 70dcda341ed73246a981e2c13a680850824f0f50 /dom/media/gmp/GMPDecryptorParent.cpp | |
parent | 38e595cb2d37cb30b094e9e79c9a73ef16baab1a (diff) | |
download | uxp-eme.tar.gz |
Issue #26 - Undo Bug 1290830 - Make Decryptor APIs reusable by not only GMP framework - Part 1: Reverse patch applicable hunks (Auto)eme
Diffstat (limited to 'dom/media/gmp/GMPDecryptorParent.cpp')
-rw-r--r-- | dom/media/gmp/GMPDecryptorParent.cpp | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/dom/media/gmp/GMPDecryptorParent.cpp b/dom/media/gmp/GMPDecryptorParent.cpp index 1f8b9a7a8e..b5595f825b 100644 --- a/dom/media/gmp/GMPDecryptorParent.cpp +++ b/dom/media/gmp/GMPDecryptorParent.cpp @@ -277,18 +277,6 @@ GMPDecryptorParent::RecvRejectPromise(const uint32_t& aPromiseId, return true; } - -static dom::MediaKeyMessageType -ToMediaKeyMessageType(GMPSessionMessageType aMessageType) { - switch (aMessageType) { - case kGMPLicenseRequest: return dom::MediaKeyMessageType::License_request; - case kGMPLicenseRenewal: return dom::MediaKeyMessageType::License_renewal; - case kGMPLicenseRelease: return dom::MediaKeyMessageType::License_release; - case kGMPIndividualizationRequest: return dom::MediaKeyMessageType::Individualization_request; - default: return dom::MediaKeyMessageType::License_request; - }; -}; - bool GMPDecryptorParent::RecvSessionMessage(const nsCString& aSessionId, const GMPSessionMessageType& aMessageType, @@ -301,7 +289,7 @@ GMPDecryptorParent::RecvSessionMessage(const nsCString& aSessionId, NS_WARNING("Trying to use a dead GMP decrypter!"); return false; } - mCallback->SessionMessage(aSessionId, ToMediaKeyMessageType(aMessageType), aMessage); + mCallback->SessionMessage(aSessionId, aMessageType, aMessage); return true; } @@ -355,20 +343,6 @@ GMPDecryptorParent::RecvSessionError(const nsCString& aSessionId, return true; } -static dom::MediaKeyStatus -ToMediaKeyStatus(GMPMediaKeyStatus aStatus) { - switch (aStatus) { - case kGMPUsable: return dom::MediaKeyStatus::Usable; - case kGMPExpired: return dom::MediaKeyStatus::Expired; - case kGMPOutputDownscaled: return dom::MediaKeyStatus::Output_downscaled; - case kGMPOutputRestricted: return dom::MediaKeyStatus::Output_restricted; - case kGMPInternalError: return dom::MediaKeyStatus::Internal_error; - case kGMPReleased: return dom::MediaKeyStatus::Released; - case kGMPStatusPending: return dom::MediaKeyStatus::Status_pending; - default: return dom::MediaKeyStatus::Internal_error; - } -} - bool GMPDecryptorParent::RecvBatchedKeyStatusChanged(const nsCString& aSessionId, InfallibleTArray<GMPKeyInformation>&& aKeyInfos) @@ -418,7 +392,7 @@ GMPDecryptorParent::RecvDecrypted(const uint32_t& aId, NS_WARNING("Trying to use a dead GMP decrypter!"); return false; } - mCallback->Decrypted(aId, ToDecryptStatus(aErr), aBuffer); + mCallback->Decrypted(aId, aErr, aBuffer); return true; } |