--- a/dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp
+++ b/dom/media/gmp-plugin-openh264/gmp-fake-openh264.cpp
@@ -405,17 +405,17 @@ extern "C" {
if (!strcmp (aApiName, GMP_API_VIDEO_DECODER)) {
*aPluginApi = new FakeVideoDecoder (static_cast<GMPVideoHost*> (aHostAPI));
return GMPNoErr;
} else if (!strcmp (aApiName, GMP_API_VIDEO_ENCODER)) {
*aPluginApi = new FakeVideoEncoder (static_cast<GMPVideoHost*> (aHostAPI));
return GMPNoErr;
#if defined(GMP_FAKE_SUPPORT_DECRYPT)
} else if (!strcmp (aApiName, GMP_API_DECRYPTOR)) {
- *aPluginApi = new FakeDecryptor(static_cast<GMPDecryptorHost*> (aHostAPI));
+ *aPluginApi = new FakeDecryptor();
return GMPNoErr;
#endif
}
return GMPGenericErr;
}
PUBLIC_FUNC void
GMPShutdown (void) {
--- a/dom/media/gmp-plugin/gmp-fake.cpp
+++ b/dom/media/gmp-plugin/gmp-fake.cpp
@@ -68,17 +68,17 @@ extern "C" {
GMPGetAPI (const char* aApiName, void* aHostAPI, void** aPluginApi) {
if (!strcmp (aApiName, GMP_API_VIDEO_DECODER)) {
// Note: Deliberately advertise in our .info file that we support
// video-decode, but we fail the "get" call here to simulate what
// happens when decoder init fails.
return GMPGenericErr;
#if defined(GMP_FAKE_SUPPORT_DECRYPT)
} else if (!strcmp (aApiName, GMP_API_DECRYPTOR)) {
- *aPluginApi = new FakeDecryptor(static_cast<GMPDecryptorHost*> (aHostAPI));
+ *aPluginApi = new FakeDecryptor();
return GMPNoErr;
#endif
}
return GMPGenericErr;
}
PUBLIC_FUNC void
GMPShutdown (void) {
--- a/dom/media/gmp-plugin/gmp-test-decryptor.cpp
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.cpp
@@ -93,19 +93,18 @@ private:
g_platform_api->createmutex(&mutex);
return mutex;
}
GMPMutex* const mMutex;
set<string> mTestIDs;
};
-FakeDecryptor::FakeDecryptor(GMPDecryptorHost* aHost)
+FakeDecryptor::FakeDecryptor()
: mCallback(nullptr)
- , mHost(aHost)
{
MOZ_ASSERT(!sInstance);
sInstance = this;
}
void FakeDecryptor::DecryptingComplete()
{
sInstance = nullptr;
@@ -556,20 +555,14 @@ FakeDecryptor::UpdateSession(uint32_t aP
sShutdownMode = ShutdownStoreToken;
sShutdownToken = tokens[2];
Message("shutdown-token received " + sShutdownToken);
}
} else if (task == "retrieve-shutdown-token") {
ReadRecord("shutdown-token", new ReportReadRecordContinuation("shutdown-token"));
} else if (task == "test-op-apis") {
mozilla::gmptest::TestOuputProtectionAPIs();
- } else if (task == "retrieve-plugin-voucher") {
- const uint8_t* rawVoucher = nullptr;
- uint32_t length = 0;
- mHost->GetPluginVoucher(&rawVoucher, &length);
- std::string voucher((const char*)rawVoucher, (const char*)(rawVoucher + length));
- Message("retrieved plugin-voucher: " + voucher);
} else if (task == "retrieve-record-names") {
GMPEnumRecordNames(&RecvGMPRecordIterator, this);
} else if (task == "retrieve-node-id") {
Message("node-id " + sNodeId);
}
}
--- a/dom/media/gmp-plugin/gmp-test-decryptor.h
+++ b/dom/media/gmp-plugin/gmp-test-decryptor.h
@@ -8,17 +8,17 @@
#include "gmp-decryption.h"
#include <string>
#include "mozilla/Attributes.h"
class FakeDecryptor : public GMPDecryptor {
public:
- explicit FakeDecryptor(GMPDecryptorHost* aHost);
+ explicit FakeDecryptor();
void Init(GMPDecryptorCallback* aCallback,
bool aDistinctiveIdentifierRequired,
bool aPersistentStateRequired) override
{
mCallback = aCallback;
}
@@ -82,12 +82,11 @@ private:
virtual ~FakeDecryptor() {}
static FakeDecryptor* sInstance;
static std::string sNodeId;
void TestStorage();
GMPDecryptorCallback* mCallback;
- GMPDecryptorHost* mHost;
};
#endif
--- a/dom/media/gmp/GMPChild.cpp
+++ b/dom/media/gmp/GMPChild.cpp
@@ -22,18 +22,16 @@
#include "GMPUtils.h"
#include "prio.h"
#include "base/task.h"
#include "widevine-adapter/WidevineAdapter.h"
using namespace mozilla::ipc;
using mozilla::dom::CrashReporterChild;
-static const int MAX_VOUCHER_LENGTH = 500000;
-
#ifdef XP_WIN
#include <stdlib.h> // for _exit()
#else
#include <unistd.h> // for _exit()
#endif
#if defined(MOZ_GMP_SANDBOX)
#if defined(XP_MACOSX)
@@ -95,25 +93,16 @@ GetFileBase(const nsAString& aPluginPath
aBaseName = Substring(parentLeafName,
4,
parentLeafName.Length() - 1);
return true;
}
static bool
-GetFileBase(const nsAString& aPluginPath,
- nsCOMPtr<nsIFile>& aFileBase,
- nsAutoString& aBaseName)
-{
- nsCOMPtr<nsIFile> unusedLibDir;
- return GetFileBase(aPluginPath, unusedLibDir, aFileBase, aBaseName);
-}
-
-static bool
GetPluginFile(const nsAString& aPluginPath,
nsCOMPtr<nsIFile>& aLibDirectory,
nsCOMPtr<nsIFile>& aLibFile)
{
nsAutoString baseName;
GetFileBase(aPluginPath, aLibDirectory, aLibFile, baseName);
#if defined(XP_MACOSX)
@@ -239,33 +228,31 @@ GMPChild::SetMacSandboxInfo(MacSandboxPl
mGMPLoader->SetSandboxInfo(&info);
return true;
}
#endif // XP_MACOSX && MOZ_GMP_SANDBOX
bool
GMPChild::Init(const nsAString& aPluginPath,
- const nsAString& aVoucherPath,
base::ProcessId aParentPid,
MessageLoop* aIOLoop,
IPC::Channel* aChannel)
{
LOGD("%s pluginPath=%s", __FUNCTION__, NS_ConvertUTF16toUTF8(aPluginPath).get());
if (NS_WARN_IF(!Open(aChannel, aParentPid, aIOLoop))) {
return false;
}
#ifdef MOZ_CRASHREPORTER
SendPCrashReporterConstructor(CrashReporter::CurrentThreadId());
#endif
mPluginPath = aPluginPath;
- mSandboxVoucherPath = aVoucherPath;
return true;
}
mozilla::ipc::IPCResult
GMPChild::RecvSetNodeId(const nsCString& aNodeId)
{
LOGD("%s nodeId=%s", __FUNCTION__, aNodeId.Data());
@@ -347,22 +334,16 @@ GMPChild::GetUTF8LibPath(nsACString& aOu
#endif
}
mozilla::ipc::IPCResult
GMPChild::AnswerStartPlugin(const nsString& aAdapter)
{
LOGD("%s", __FUNCTION__);
- if (!PreLoadPluginVoucher()) {
- NS_WARNING("Plugin voucher failed to load!");
- return IPC_FAIL_NO_REASON(this);
- }
- PreLoadSandboxVoucher();
-
nsCString libPath;
if (!GetUTF8LibPath(libPath)) {
return IPC_FAIL_NO_REASON(this);
}
auto platformAPI = new GMPPlatformAPI();
InitPlatformAPI(*platformAPI, this);
@@ -528,57 +509,16 @@ mozilla::ipc::IPCResult
GMPChild::RecvCloseActive()
{
for (uint32_t i = mGMPContentChildren.Length(); i > 0; i--) {
mGMPContentChildren[i - 1]->CloseActive();
}
return IPC_OK();
}
-static void
-GetPluginVoucherFile(const nsAString& aPluginPath,
- nsCOMPtr<nsIFile>& aOutVoucherFile)
-{
- nsAutoString baseName;
- GetFileBase(aPluginPath, aOutVoucherFile, baseName);
- nsAutoString infoFileName = baseName + NS_LITERAL_STRING(".voucher");
- aOutVoucherFile->AppendRelativePath(infoFileName);
-}
-
-bool
-GMPChild::PreLoadPluginVoucher()
-{
- nsCOMPtr<nsIFile> voucherFile;
- GetPluginVoucherFile(mPluginPath, voucherFile);
- if (!FileExists(voucherFile)) {
- // Assume missing file is not fatal; that would break OpenH264.
- return true;
- }
- return ReadIntoArray(voucherFile, mPluginVoucher, MAX_VOUCHER_LENGTH);
-}
-
-void
-GMPChild::PreLoadSandboxVoucher()
-{
- nsCOMPtr<nsIFile> f;
- nsresult rv = NS_NewLocalFile(mSandboxVoucherPath, true, getter_AddRefs(f));
- if (NS_FAILED(rv)) {
- NS_WARNING("Can't create nsIFile for sandbox voucher");
- return;
- }
- if (!FileExists(f)) {
- // Assume missing file is not fatal; that would break OpenH264.
- return;
- }
-
- if (!ReadIntoArray(f, mSandboxVoucher, MAX_VOUCHER_LENGTH)) {
- NS_WARNING("Failed to read sandbox voucher");
- }
-}
-
PGMPContentChild*
GMPChild::AllocPGMPContentChild(Transport* aTransport,
ProcessId aOtherPid)
{
GMPContentChild* child =
mGMPContentChildren.AppendElement(new GMPContentChild(this))->get();
child->Open(aTransport, aOtherPid, XRE_GetIOMessageLoop(), ipc::ChildSide);
--- a/dom/media/gmp/GMPChild.h
+++ b/dom/media/gmp/GMPChild.h
@@ -20,36 +20,32 @@ class GMPContentChild;
class GMPChild : public PGMPChild
{
public:
GMPChild();
virtual ~GMPChild();
bool Init(const nsAString& aPluginPath,
- const nsAString& aVoucherPath,
base::ProcessId aParentPid,
MessageLoop* aIOLoop,
IPC::Channel* aChannel);
MessageLoop* GMPMessageLoop();
// Main thread only.
GMPTimerChild* GetGMPTimers();
GMPStorageChild* GetGMPStorage();
#if defined(XP_MACOSX) && defined(MOZ_GMP_SANDBOX)
bool SetMacSandboxInfo(MacSandboxPluginType aPluginType);
#endif
private:
friend class GMPContentChild;
- bool PreLoadPluginVoucher();
- void PreLoadSandboxVoucher();
-
bool GetUTF8LibPath(nsACString& aOutLibPath);
mozilla::ipc::IPCResult RecvSetNodeId(const nsCString& aNodeId) override;
mozilla::ipc::IPCResult AnswerStartPlugin(const nsString& aAdapter) override;
mozilla::ipc::IPCResult RecvPreloadLibs(const nsCString& aLibs) override;
PCrashReporterChild* AllocPCrashReporterChild(const NativeThreadId& aThread) override;
bool DeallocPCrashReporterChild(PCrashReporterChild*) override;
@@ -74,19 +70,16 @@ private:
nsTArray<UniquePtr<GMPContentChild>> mGMPContentChildren;
RefPtr<GMPTimerChild> mTimerChild;
RefPtr<GMPStorageChild> mStorage;
MessageLoop* mGMPMessageLoop;
nsString mPluginPath;
- nsString mSandboxVoucherPath;
nsCString mNodeId;
GMPLoader* mGMPLoader;
- nsTArray<uint8_t> mPluginVoucher;
- nsTArray<uint8_t> mSandboxVoucher;
};
} // namespace gmp
} // namespace mozilla
#endif // GMPChild_h_
--- a/dom/media/gmp/GMPContentChild.cpp
+++ b/dom/media/gmp/GMPContentChild.cpp
@@ -46,19 +46,17 @@ void
GMPContentChild::ProcessingError(Result aCode, const char* aReason)
{
mGMPChild->ProcessingError(aCode, aReason);
}
PGMPDecryptorChild*
GMPContentChild::AllocPGMPDecryptorChild()
{
- GMPDecryptorChild* actor = new GMPDecryptorChild(this,
- mGMPChild->mPluginVoucher,
- mGMPChild->mSandboxVoucher);
+ GMPDecryptorChild* actor = new GMPDecryptorChild(this);
actor->AddRef();
return actor;
}
bool
GMPContentChild::DeallocPGMPDecryptorChild(PGMPDecryptorChild* aActor)
{
static_cast<GMPDecryptorChild*>(aActor)->Release();
@@ -94,20 +92,19 @@ GMPContentChild::DeallocPGMPVideoEncoder
static_cast<GMPVideoEncoderChild*>(aActor)->Release();
return true;
}
mozilla::ipc::IPCResult
GMPContentChild::RecvPGMPDecryptorConstructor(PGMPDecryptorChild* aActor)
{
GMPDecryptorChild* child = static_cast<GMPDecryptorChild*>(aActor);
- GMPDecryptorHost* host = static_cast<GMPDecryptorHost*>(child);
void* ptr = nullptr;
- GMPErr err = mGMPChild->GetAPI(GMP_API_DECRYPTOR, host, &ptr, aActor->Id());
+ GMPErr err = mGMPChild->GetAPI(GMP_API_DECRYPTOR, nullptr, &ptr, aActor->Id());
if (err != GMPNoErr || !ptr) {
NS_WARNING("GMPGetAPI call failed trying to construct decryptor.");
return IPC_FAIL_NO_REASON(this);
}
child->Init(static_cast<GMPDecryptor*>(ptr));
return IPC_OK();
}
--- a/dom/media/gmp/GMPDecryptorChild.cpp
+++ b/dom/media/gmp/GMPDecryptorChild.cpp
@@ -15,23 +15,19 @@
#define ON_GMP_THREAD() (mPlugin->GMPMessageLoop() == MessageLoop::current())
#define CALL_ON_GMP_THREAD(_func, ...) \
CallOnGMPThread(&GMPDecryptorChild::_func, __VA_ARGS__)
namespace mozilla {
namespace gmp {
-GMPDecryptorChild::GMPDecryptorChild(GMPContentChild* aPlugin,
- const nsTArray<uint8_t>& aPluginVoucher,
- const nsTArray<uint8_t>& aSandboxVoucher)
+GMPDecryptorChild::GMPDecryptorChild(GMPContentChild* aPlugin)
: mSession(nullptr)
, mPlugin(aPlugin)
- , mPluginVoucher(aPluginVoucher)
- , mSandboxVoucher(aSandboxVoucher)
{
MOZ_ASSERT(mPlugin);
}
GMPDecryptorChild::~GMPDecryptorChild()
{
}
@@ -218,38 +214,16 @@ GMPDecryptorChild::Decrypted(GMPBuffer*
}
void
GMPDecryptorChild::SetCapabilities(uint64_t aCaps)
{
// Deprecated.
}
-void
-GMPDecryptorChild::GetSandboxVoucher(const uint8_t** aVoucher,
- uint32_t* aVoucherLength)
-{
- if (!aVoucher || !aVoucherLength) {
- return;
- }
- *aVoucher = mSandboxVoucher.Elements();
- *aVoucherLength = mSandboxVoucher.Length();
-}
-
-void
-GMPDecryptorChild::GetPluginVoucher(const uint8_t** aVoucher,
- uint32_t* aVoucherLength)
-{
- if (!aVoucher || !aVoucherLength) {
- return;
- }
- *aVoucher = mPluginVoucher.Elements();
- *aVoucherLength = mPluginVoucher.Length();
-}
-
mozilla::ipc::IPCResult
GMPDecryptorChild::RecvInit(const bool& aDistinctiveIdentifierRequired,
const bool& aPersistentStateRequired)
{
if (!mSession) {
return IPC_FAIL_NO_REASON(this);
}
mSession->Init(this, aDistinctiveIdentifierRequired, aPersistentStateRequired);
--- a/dom/media/gmp/GMPDecryptorChild.h
+++ b/dom/media/gmp/GMPDecryptorChild.h
@@ -13,25 +13,22 @@
#include <string>
namespace mozilla {
namespace gmp {
class GMPContentChild;
class GMPDecryptorChild : public GMPDecryptorCallback
- , public GMPDecryptorHost
, public PGMPDecryptorChild
{
public:
NS_INLINE_DECL_THREADSAFE_REFCOUNTING(GMPDecryptorChild);
- explicit GMPDecryptorChild(GMPContentChild* aPlugin,
- const nsTArray<uint8_t>& aPluginVoucher,
- const nsTArray<uint8_t>& aSandboxVoucher);
+ explicit GMPDecryptorChild(GMPContentChild* aPlugin);
void Init(GMPDecryptor* aSession);
// GMPDecryptorCallback
void SetSessionId(uint32_t aCreateSessionToken,
const char* aSessionId,
uint32_t aSessionIdLength) override;
void ResolveLoadSessionPromise(uint32_t aPromiseId,
@@ -73,22 +70,16 @@ public:
void Decrypted(GMPBuffer* aBuffer, GMPErr aResult) override;
void BatchedKeyStatusChanged(const char* aSessionId,
uint32_t aSessionIdLength,
const GMPMediaKeyInfo* aKeyInfos,
uint32_t aKeyInfosLength) override;
- // GMPDecryptorHost
- void GetSandboxVoucher(const uint8_t** aVoucher,
- uint32_t* aVoucherLength) override;
-
- void GetPluginVoucher(const uint8_t** aVoucher,
- uint32_t* aVoucherLength) override;
private:
~GMPDecryptorChild();
// GMPDecryptorChild
mozilla::ipc::IPCResult RecvInit(const bool& aDistinctiveIdentifierRequired,
const bool& aPersistentStateRequired) override;
mozilla::ipc::IPCResult RecvCreateSession(const uint32_t& aCreateSessionToken,
@@ -125,18 +116,14 @@ private:
template<typename MethodType, typename... ParamType>
void CallOnGMPThread(MethodType, ParamType&&...);
// GMP's GMPDecryptor implementation.
// Only call into this on the (GMP process) main thread.
GMPDecryptor* mSession;
GMPContentChild* mPlugin;
-
- // Reference to the vouchers owned by the GMPChild.
- const nsTArray<uint8_t>& mPluginVoucher;
- const nsTArray<uint8_t>& mSandboxVoucher;
};
} // namespace gmp
} // namespace mozilla
#endif // GMPDecryptorChild_h_
--- a/dom/media/gmp/GMPProcessChild.cpp
+++ b/dom/media/gmp/GMPProcessChild.cpp
@@ -23,39 +23,35 @@ GMPProcessChild::GMPProcessChild(Process
GMPProcessChild::~GMPProcessChild()
{
}
bool
GMPProcessChild::Init()
{
nsAutoString pluginFilename;
- nsAutoString voucherFilename;
#if defined(OS_POSIX)
// NB: need to be very careful in ensuring that the first arg
// (after the binary name) here is indeed the plugin module path.
// Keep in sync with dom/plugins/PluginModuleParent.
std::vector<std::string> values = CommandLine::ForCurrentProcess()->argv();
- MOZ_ASSERT(values.size() >= 3, "not enough args");
+ MOZ_ASSERT(values.size() >= 2, "not enough args");
pluginFilename = NS_ConvertUTF8toUTF16(nsDependentCString(values[1].c_str()));
- voucherFilename = NS_ConvertUTF8toUTF16(nsDependentCString(values[2].c_str()));
#elif defined(OS_WIN)
std::vector<std::wstring> values = CommandLine::ForCurrentProcess()->GetLooseValues();
- MOZ_ASSERT(values.size() >= 2, "not enough loose args");
+ MOZ_ASSERT(values.size() >= 1, "not enough loose args");
pluginFilename = nsDependentString(values[0].c_str());
- voucherFilename = nsDependentString(values[1].c_str());
#else
#error Not implemented
#endif
BackgroundHangMonitor::Startup();
return mPlugin.Init(pluginFilename,
- voucherFilename,
ParentPid(),
IOThreadChild::message_loop(),
IOThreadChild::channel());
}
void
GMPProcessChild::CleanUp()
{
--- a/dom/media/gmp/GMPProcessParent.cpp
+++ b/dom/media/gmp/GMPProcessParent.cpp
@@ -37,24 +37,16 @@ GMPProcessParent::GMPProcessParent(const
GMPProcessParent::~GMPProcessParent()
{
MOZ_COUNT_DTOR(GMPProcessParent);
}
bool
GMPProcessParent::Launch(int32_t aTimeoutMs)
{
- nsCOMPtr<nsIFile> path;
- if (!GetEMEVoucherPath(getter_AddRefs(path))) {
- NS_WARNING("GMPProcessParent can't get EME voucher path!");
- return false;
- }
- nsAutoCString voucherPath;
- path->GetNativePath(voucherPath);
-
vector<string> args;
#if defined(XP_WIN) && defined(MOZ_SANDBOX)
std::wstring wGMPPath = UTF8ToWide(mGMPPath.c_str());
// The sandbox doesn't allow file system rules where the paths contain
// symbolic links or junction points. Sometimes the Users folder has been
// moved to another drive using a junction point, so allow for this specific
@@ -77,18 +69,16 @@ GMPProcessParent::Launch(int32_t aTimeou
mAllowedFilesRead.push_back(wGMPPath + L"\\*");
}
args.push_back(WideToUTF8(wGMPPath));
#else
args.push_back(mGMPPath);
#endif
- args.push_back(string(voucherPath.BeginReading(), voucherPath.EndReading()));
-
return SyncLaunch(args, aTimeoutMs, base::GetCurrentProcessArchitecture());
}
void
GMPProcessParent::Delete(nsCOMPtr<nsIRunnable> aCallback)
{
mDeletedCallback = aCallback;
XRE_GetIOMessageLoop()->PostTask(NewNonOwningRunnableMethod(this, &GMPProcessParent::DoDelete));
--- a/dom/media/gmp/GMPUtils.cpp
+++ b/dom/media/gmp/GMPUtils.cpp
@@ -10,40 +10,16 @@
#include "nsCOMPtr.h"
#include "nsLiteralString.h"
#include "nsCRTGlue.h"
#include "mozilla/Base64.h"
#include "nsISimpleEnumerator.h"
namespace mozilla {
-bool
-GetEMEVoucherPath(nsIFile** aPath)
-{
- nsCOMPtr<nsIFile> path;
- NS_GetSpecialDirectory(NS_GRE_DIR, getter_AddRefs(path));
- if (!path) {
- NS_WARNING("GetEMEVoucherPath can't get NS_GRE_DIR!");
- return false;
- }
- path->AppendNative(NS_LITERAL_CSTRING("voucher.bin"));
- path.forget(aPath);
- return true;
-}
-
-bool
-EMEVoucherFileExists()
-{
- nsCOMPtr<nsIFile> path;
- bool exists;
- return GetEMEVoucherPath(getter_AddRefs(path)) &&
- NS_SUCCEEDED(path->Exists(&exists)) &&
- exists;
-}
-
void
SplitAt(const char* aDelims,
const nsACString& aInput,
nsTArray<nsCString>& aOutTokens)
{
nsAutoCString str(aInput);
char* end = str.BeginWriting();
const char* start = nullptr;
--- a/dom/media/gmp/GMPUtils.h
+++ b/dom/media/gmp/GMPUtils.h
@@ -23,20 +23,16 @@ struct DestroyPolicy
void operator()(T* aGMPObject) const {
aGMPObject->Destroy();
}
};
template<typename T>
using GMPUniquePtr = mozilla::UniquePtr<T, DestroyPolicy<T>>;
-bool GetEMEVoucherPath(nsIFile** aPath);
-
-bool EMEVoucherFileExists();
-
void
SplitAt(const char* aDelims,
const nsACString& aInput,
nsTArray<nsCString>& aOutTokens);
nsCString
ToHexString(const nsTArray<uint8_t>& aBytes);
@@ -69,21 +65,16 @@ public:
bool Init(nsIFile* aFile);
bool Contains(const nsCString& aKey) const;
nsCString Get(const nsCString& aKey) const;
private:
nsClassHashtable<nsCStringHashKey, nsCString> mValues;
};
bool
-ReadIntoArray(nsIFile* aFile,
- nsTArray<uint8_t>& aOutDst,
- size_t aMaxLength);
-
-bool
ReadIntoString(nsIFile* aFile,
nsCString& aOutDst,
size_t aMaxLength);
bool
HaveGMPFor(const nsCString& aAPI,
nsTArray<nsCString>&& aTags);
--- a/dom/media/gmp/gmp-api/gmp-decryption.h
+++ b/dom/media/gmp/gmp-api/gmp-decryption.h
@@ -211,41 +211,28 @@ public:
virtual void BatchedKeyStatusChanged(const char* aSessionId,
uint32_t aSessionIdLength,
const GMPMediaKeyInfo* aKeyInfos,
uint32_t aKeyInfosLength) = 0;
virtual ~GMPDecryptorCallback() {}
};
-// Host interface, passed to GetAPIFunc(), with "decrypt".
-class GMPDecryptorHost {
-public:
- virtual void GetSandboxVoucher(const uint8_t** aVoucher,
- uint32_t* aVoucherLength) = 0;
-
- virtual void GetPluginVoucher(const uint8_t** aVoucher,
- uint32_t* aVoucherLength) = 0;
-
- virtual ~GMPDecryptorHost() {}
-};
-
enum GMPSessionType {
kGMPTemporySession = 0,
kGMPPersistentSession = 1,
kGMPSessionInvalid = 2 // Must always be last.
};
#define GMP_API_DECRYPTOR "eme-decrypt-v9"
// API exposed by plugin library to manage decryption sessions.
// When the Host requests this by calling GMPGetAPIFunc().
//
// API name macro: GMP_API_DECRYPTOR
-// Host API: GMPDecryptorHost
class GMPDecryptor {
public:
// Sets the callback to use with the decryptor to return results
// to Gecko.
virtual void Init(GMPDecryptorCallback* aCallback,
bool aDistinctiveIdentifierRequired,
bool aPersistentStateRequired) = 0;
--- a/dom/media/gtest/TestGMPCrossOrigin.cpp
+++ b/dom/media/gtest/TestGMPCrossOrigin.cpp
@@ -1104,26 +1104,16 @@ class GMPStorageTest : public GMPDecrypt
CreateDecryptor(NS_LITERAL_STRING("http://example15.com"),
NS_LITERAL_STRING("http://example16.com"),
false,
NS_LITERAL_CSTRING("test-op-apis"));
}
#endif
- void TestPluginVoucher() {
- Expect(NS_LITERAL_CSTRING("retrieved plugin-voucher: gmp-fake placeholder voucher"),
- NewRunnableMethod(this, &GMPStorageTest::SetFinished));
-
- CreateDecryptor(NS_LITERAL_STRING("http://example17.com"),
- NS_LITERAL_STRING("http://example18.com"),
- false,
- NS_LITERAL_CSTRING("retrieve-plugin-voucher"));
- }
-
void TestGetRecordNamesInMemoryStorage() {
TestGetRecordNames(true);
}
nsCString mRecordNames;
void AppendIntPadded(nsACString& aString, uint32_t aInt) {
if (aInt > 0 && aInt < 10) {
@@ -1423,21 +1413,16 @@ TEST(GeckoMediaPlugins, GMPStorageCrossO
runner->DoTest(&GMPStorageTest::TestCrossOriginStorage);
}
TEST(GeckoMediaPlugins, GMPStoragePrivateBrowsing) {
RefPtr<GMPStorageTest> runner = new GMPStorageTest();
runner->DoTest(&GMPStorageTest::TestPBStorage);
}
-TEST(GeckoMediaPlugins, GMPPluginVoucher) {
- RefPtr<GMPStorageTest> runner = new GMPStorageTest();
- runner->DoTest(&GMPStorageTest::TestPluginVoucher);
-}
-
#if defined(XP_WIN)
TEST(GeckoMediaPlugins, GMPOutputProtection) {
RefPtr<GMPStorageTest> runner = new GMPStorageTest();
runner->DoTest(&GMPStorageTest::TestOutputProtection);
}
#endif
TEST(GeckoMediaPlugins, GMPStorageGetRecordNamesInMemoryStorage) {