diff options
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/app/moz.build | 9 | ||||
-rw-r--r-- | ipc/contentproc/plugin-container.cpp | 16 |
2 files changed, 25 insertions, 0 deletions
diff --git a/ipc/app/moz.build b/ipc/app/moz.build index d6239c5dc..41eb8ccff 100644 --- a/ipc/app/moz.build +++ b/ipc/app/moz.build @@ -16,6 +16,15 @@ LOCAL_INCLUDES += [ '/xpcom/base', ] +# We link GMPLoader into plugin-container on desktop so that its code is +# covered by the desktop DRM vendor's voucher. +SOURCES += [ + '../../dom/media/gmp/GMPLoader.cpp', +] +USE_LIBS += [ + 'rlz', +] + # DELAYLOAD_DLLS in this block ensures that the DLL blocklist is functional if CONFIG['OS_ARCH'] == 'WINNT': DELAYLOAD_DLLS += [ diff --git a/ipc/contentproc/plugin-container.cpp b/ipc/contentproc/plugin-container.cpp index a85f24d34..0e59e9d7a 100644 --- a/ipc/contentproc/plugin-container.cpp +++ b/ipc/contentproc/plugin-container.cpp @@ -20,6 +20,14 @@ #include <unistd.h> #endif +#include "GMPLoader.h" + +mozilla::gmp::SandboxStarter* +MakeSandboxStarter() +{ + return nullptr; +} + int content_process_main(int argc, char* argv[]) { @@ -42,6 +50,14 @@ content_process_main(int argc, char* argv[]) SetDllDirectoryW(L""); } #endif +#ifdef MOZ_PLUGIN_CONTAINER + // On desktop, the GMPLoader lives in plugin-container, so that its + // code can be covered by an EME/GMP vendor's voucher. + nsAutoPtr<mozilla::gmp::SandboxStarter> starter(MakeSandboxStarter()); + if (XRE_GetProcessType() == GeckoProcessType_GMPlugin) { + childData.gmpLoader = mozilla::gmp::CreateGMPLoader(starter); + } +#endif nsresult rv = XRE_InitChildProcess(argc, argv, &childData); NS_ENSURE_SUCCESS(rv, 1); |