diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index 0fe805c4d5..780140c216 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -59,9 +59,7 @@ #include "mozilla/BasePrincipal.h" #include "mozilla/WebBrowserPersistDocumentChild.h" #include "imgLoader.h" -#ifdef MOZ_GMP #include "GMPServiceChild.h" -#endif #include "mozilla/Unused.h" @@ -163,9 +161,7 @@ #include "mozilla/net/NeckoMessageUtils.h" #include "mozilla/widget/PuppetBidiKeyboard.h" #include "mozilla/mozSpellChecker.h" -#ifdef MOZ_GMP #include "GMPServiceChild.h" -#endif #include "gfxPlatform.h" #include "nscore.h" // for NS_FREE_PERMANENT_DATA @@ -175,9 +171,7 @@ using namespace mozilla::dom::ipc; using namespace mozilla::dom::workers; using namespace mozilla::media; using namespace mozilla::embedding; -#ifdef MOZ_GMP using namespace mozilla::gmp; -#endif using namespace mozilla::hal_sandbox; using namespace mozilla::ipc; using namespace mozilla::layers; @@ -1129,7 +1123,6 @@ ContentChild::AllocPContentBridgeParent(mozilla::ipc::Transport* aTransport, return mLastBridge; } -#ifdef MOZ_GMP PGMPServiceChild* ContentChild::AllocPGMPServiceChild(mozilla::ipc::Transport* aTransport, base::ProcessId aOtherProcess) @@ -1143,7 +1136,6 @@ ContentChild::RecvGMPsChanged(nsTArray&& capabilities) GeckoMediaPluginServiceChild::UpdateGMPCapabilities(Move(capabilities)); return true; } -#endif bool ContentChild::RecvInitRendering(Endpoint&& aCompositor, diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index e0b03d62fd..0ce61bd6c2 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -140,14 +140,12 @@ public: AllocPContentBridgeChild(mozilla::ipc::Transport* transport, base::ProcessId otherProcess) override; -#ifdef MOZ_GMP PGMPServiceChild* AllocPGMPServiceChild(mozilla::ipc::Transport* transport, base::ProcessId otherProcess) override; bool RecvGMPsChanged(nsTArray&& capabilities) override; -#endif bool RecvInitRendering( diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 51a663969b..0a61c063fb 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -21,9 +21,7 @@ #include "AppProcessChecker.h" #include "AudioChannelService.h" #include "BlobParent.h" -#ifdef MOZ_GMP #include "GMPServiceParent.h" -#endif #include "HandlerServiceParent.h" #include "IHistory.h" #include "imgIContainer.h" @@ -233,9 +231,7 @@ using namespace mozilla::dom::power; using namespace mozilla::media; using namespace mozilla::embedding; using namespace mozilla::gfx; -#ifdef MOZ_GMP using namespace mozilla::gmp; -#endif using namespace mozilla::hal; using namespace mozilla::ipc; using namespace mozilla::layers; @@ -871,13 +867,11 @@ static nsIDocShell* GetOpenerDocShellHelper(Element* aFrameElement) return docShell; } -#ifdef MOZ_GMP bool ContentParent::RecvCreateGMPService() { return PGMPService::Open(this); } -#endif bool ContentParent::RecvLoadPlugin(const uint32_t& aPluginId, nsresult* aRv, uint32_t* aRunID) @@ -1281,10 +1275,8 @@ ContentParent::Init() } #endif -#ifdef MOZ_GMP RefPtr gmps(GeckoMediaPluginServiceParent::GetSingleton()); gmps->UpdateContentProcessGMPCapabilities(); -#endif } void @@ -2559,14 +2551,12 @@ ContentParent::Observe(nsISupports* aSubject, return NS_OK; } -#ifdef MOZ_GMP PGMPServiceParent* ContentParent::AllocPGMPServiceParent(mozilla::ipc::Transport* aTransport, base::ProcessId aOtherProcess) { return GMPServiceParent::Create(aTransport, aOtherProcess); } -#endif PBackgroundParent* ContentParent::AllocPBackgroundParent(Transport* aTransport, diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 15f29dbbc6..561bcf9f68 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -237,9 +237,7 @@ public: virtual bool RecvBridgeToChildProcess(const ContentParentId& aCpId) override; -#ifdef MOZ_GMP virtual bool RecvCreateGMPService() override; -#endif virtual bool RecvLoadPlugin(const uint32_t& aPluginId, nsresult* aRv, uint32_t* aRunID) override; @@ -672,11 +670,9 @@ private: TabParent* aTopLevel, const TabId& aTabId, uint64_t* aId); -#ifdef MOZ_GMP PGMPServiceParent* AllocPGMPServiceParent(mozilla::ipc::Transport* aTransport, base::ProcessId aOtherProcess) override; -#endif PBackgroundParent* AllocPBackgroundParent(Transport* aTransport, ProcessId aOtherProcess) diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index 0bd4f97085..3ac02f4b7c 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -26,14 +26,10 @@ include protocol PNecko; // bridging PContent and PGMP. As soon as it registers the bridge between // PContent and PPluginModule it seems to think that PContent's parent and // child live in the same process! -#ifdef MOZ_GMP include protocol PGMPContent; include protocol PGMPService; include protocol PPluginModule; include protocol PGMP; -#else -include protocol PPluginModule; -#endif include protocol PPrinting; include protocol PSendStream; include protocol POfflineCacheUpdate; @@ -215,7 +211,6 @@ struct BlobURLRegistrationData Principal principal; }; -#ifdef MOZ_GMP struct GMPAPITags { nsCString api; @@ -228,16 +223,13 @@ struct GMPCapabilityData nsCString version; GMPAPITags[] capabilities; }; -#endif nested(upto inside_cpow) sync protocol PContent { parent spawns PPluginModule; parent opens PProcessHangMonitor; -#ifdef MOZ_GMP parent opens PGMPService; -#endif child opens PBackground; manages PBlob; @@ -524,9 +516,8 @@ child: async BlobURLUnregistration(nsCString aURI); -#ifdef MOZ_GMP + async GMPsChanged(GMPCapabilityData[] capabilities); -#endif parent: /** @@ -559,9 +550,7 @@ parent: returns (ContentParentId cpId, bool isForApp, bool isForBrowser, TabId tabId); sync BridgeToChildProcess(ContentParentId cpId); -#ifdef MOZ_GMP async CreateGMPService(); -#endif /** * This call connects the content process to a plugin process. While this diff --git a/dom/ipc/moz.build b/dom/ipc/moz.build index 5f6cdbf08b..0aa3450e47 100644 --- a/dom/ipc/moz.build +++ b/dom/ipc/moz.build @@ -73,7 +73,7 @@ SOURCES += [ 'ProcessHangMonitor.cpp', ] -PREPROCESSED_IPDL_SOURCES += [ +IPDL_SOURCES += [ 'BlobTypes.ipdlh', 'DOMTypes.ipdlh', 'PBlob.ipdl', diff --git a/dom/locales/en-US/chrome/plugins.properties b/dom/locales/en-US/chrome/plugins.properties index c13ac18969..fe03be59e9 100644 --- a/dom/locales/en-US/chrome/plugins.properties +++ b/dom/locales/en-US/chrome/plugins.properties @@ -22,7 +22,6 @@ suffixes_label=Suffixes learn_more_label=Learn More # GMP Plugins -#ifdef MOZ_GMP gmp_license_info=License information gmp_privacy_info=Privacy Information @@ -33,4 +32,3 @@ eme-adobe_name=Primetime Content Decryption Module provided by Adobe Systems, In eme-adobe_description=Play back protected web video. widevine_description=Widevine Content Decryption Module provided by Google Inc. -#endif diff --git a/dom/locales/jar.mn b/dom/locales/jar.mn index 858ccdd70f..fadab2a3e7 100644 --- a/dom/locales/jar.mn +++ b/dom/locales/jar.mn @@ -15,7 +15,7 @@ locale/@AB_CD@/global/global.dtd (%chrome/global.dtd) locale/@AB_CD@/global/appstrings.properties (%chrome/appstrings.properties) locale/@AB_CD@/global/global-strres.properties (%chrome/global-strres.properties) -* locale/@AB_CD@/global/plugins.properties (%chrome/plugins.properties) + locale/@AB_CD@/global/plugins.properties (%chrome/plugins.properties) locale/@AB_CD@/global/nsWebBrowserPersist.properties (%chrome/nsWebBrowserPersist.properties) locale/@AB_CD@/global/xslt/xslt.properties (%chrome/xslt/xslt.properties) locale/@AB_CD@/global/dom/dom.properties (%chrome/dom/dom.properties) diff --git a/dom/media/AbstractMediaDecoder.h b/dom/media/AbstractMediaDecoder.h index aec38c280f..f62b3ff4a5 100644 --- a/dom/media/AbstractMediaDecoder.h +++ b/dom/media/AbstractMediaDecoder.h @@ -16,9 +16,7 @@ #include "nsDataHashtable.h" #include "nsThreadUtils.h" -#ifdef MOZ_GMP class GMPCrashHelper; -#endif namespace mozilla { @@ -112,9 +110,7 @@ public: // Set by Reader if the current audio track can be offloaded virtual void SetPlatformCanOffloadAudio(bool aCanOffloadAudio) {} -#ifdef MOZ_GMP virtual already_AddRefed GetCrashHelper() { return nullptr; } -#endif // Stack based class to assist in notifying the frame statistics of // parsed and decoded frames. Use inside video demux & decode functions diff --git a/dom/media/DecoderDoctorDiagnostics.cpp b/dom/media/DecoderDoctorDiagnostics.cpp index 4d3502938c..570268d89c 100644 --- a/dom/media/DecoderDoctorDiagnostics.cpp +++ b/dom/media/DecoderDoctorDiagnostics.cpp @@ -845,7 +845,6 @@ DecoderDoctorDiagnostics::GetDescription() const if (mFFmpegFailedToLoad) { s += ", Linux platform decoder failed to load"; } -#ifdef MOZ_GMP if (mGMPPDMFailedToStartup) { s += ", GMP PDM failed to startup"; } else if (!mGMP.IsEmpty()) { @@ -853,7 +852,6 @@ DecoderDoctorDiagnostics::GetDescription() const s += mGMP; s += "'"; } -#endif break; case eMediaKeySystemAccessRequest: s = "key system='"; diff --git a/dom/media/DecoderDoctorDiagnostics.h b/dom/media/DecoderDoctorDiagnostics.h index 590988d1da..35e04e698f 100644 --- a/dom/media/DecoderDoctorDiagnostics.h +++ b/dom/media/DecoderDoctorDiagnostics.h @@ -78,18 +78,14 @@ public: void SetFFmpegFailedToLoad() { mFFmpegFailedToLoad = true; } bool DidFFmpegFailToLoad() const { return mFFmpegFailedToLoad; } -#ifdef MOZ_GMP void SetGMPPDMFailedToStartup() { mGMPPDMFailedToStartup = true; } bool DidGMPPDMFailToStartup() const { return mGMPPDMFailedToStartup; } -#endif void SetVideoNotSupported() { mVideoNotSupported = true; } void SetAudioNotSupported() { mAudioNotSupported = true; } -#ifdef MOZ_GMP void SetGMP(const nsACString& aGMP) { mGMP = aGMP; } const nsACString& GMP() const { return mGMP; } -#endif const nsAString& KeySystem() const { return mKeySystem; } bool IsKeySystemSupported() const { return mIsKeySystemSupported; } @@ -123,14 +119,10 @@ private: bool mWMFFailedToLoad = false; bool mFFmpegFailedToLoad = false; -#ifdef MOZ_GMP bool mGMPPDMFailedToStartup = false; -#endif bool mVideoNotSupported = false; bool mAudioNotSupported = false; -#ifdef MOZ_GMP nsCString mGMP; -#endif nsString mKeySystem; bool mIsKeySystemSupported = false; diff --git a/dom/media/MediaDecoder.cpp b/dom/media/MediaDecoder.cpp index 472f694baa..26528893f6 100644 --- a/dom/media/MediaDecoder.cpp +++ b/dom/media/MediaDecoder.cpp @@ -29,9 +29,7 @@ #include "mozilla/dom/VideoTrack.h" #include "mozilla/dom/VideoTrackList.h" #include "nsPrintfCString.h" -#ifdef MOZ_GMP #include "GMPService.h" -#endif #include "Layers.h" #include "mozilla/layers/ShadowLayers.h" @@ -931,7 +929,6 @@ MediaDecoder::OwnerHasError() const return mOwner->HasError(); } -#ifdef MOZ_GMP class MediaElementGMPCrashHelper : public GMPCrashHelper { public: @@ -959,7 +956,6 @@ MediaDecoder::GetCrashHelper() return mOwner->GetMediaElement() ? MakeAndAddRef(mOwner->GetMediaElement()) : nullptr; } -#endif bool MediaDecoder::IsEnded() const diff --git a/dom/media/MediaDecoder.h b/dom/media/MediaDecoder.h index ae70ecec17..2af8ff73d8 100644 --- a/dom/media/MediaDecoder.h +++ b/dom/media/MediaDecoder.h @@ -242,9 +242,7 @@ public: // Must be called before Shutdown(). bool OwnerHasError() const; -#ifdef MOZ_GMP already_AddRefed GetCrashHelper() override; -#endif protected: // Updates the media duration. This is called while the media is being diff --git a/dom/media/MediaFormatReader.cpp b/dom/media/MediaFormatReader.cpp index 26e2fdea16..24c29599f0 100644 --- a/dom/media/MediaFormatReader.cpp +++ b/dom/media/MediaFormatReader.cpp @@ -365,9 +365,7 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack) : *ownerData.mOriginalInfo->GetAsAudioInfo(), ownerData.mTaskQueue, ownerData.mCallback.get(), -#ifdef MOZ_GMP mOwner->mCrashHelper, -#endif ownerData.mIsBlankDecode, &result }); @@ -385,9 +383,7 @@ MediaFormatReader::DecoderFactory::DoCreateDecoder(TrackType aTrack) ownerData.mCallback.get(), mOwner->mKnowsCompositor, mOwner->GetImageContainer(), -#ifdef MOZ_GMP mOwner->mCrashHelper, -#endif ownerData.mIsBlankDecode, &result }); @@ -580,11 +576,9 @@ MediaFormatReader::InitInternal() mVideo.mTaskQueue = new TaskQueue(GetMediaThreadPool(MediaThreadType::PLATFORM_DECODER)); -#ifdef MOZ_GMP // Note: GMPCrashHelper must be created on main thread, as it may use // weak references, which aren't threadsafe. mCrashHelper = mDecoder->GetCrashHelper(); -#endif return NS_OK; } diff --git a/dom/media/MediaFormatReader.h b/dom/media/MediaFormatReader.h index b9b1a3cb12..c0b3abdfd2 100644 --- a/dom/media/MediaFormatReader.h +++ b/dom/media/MediaFormatReader.h @@ -585,9 +585,7 @@ private: RefPtr mCDMProxy; -#ifdef MOZ_GMP RefPtr mCrashHelper; -#endif void SetBlankDecode(TrackType aTrack, bool aIsBlankDecode); diff --git a/dom/media/MediaPrefs.h b/dom/media/MediaPrefs.h index 3e4e1dae8c..10eec1c94a 100644 --- a/dom/media/MediaPrefs.h +++ b/dom/media/MediaPrefs.h @@ -35,9 +35,7 @@ static StripAtomic Get##Name##PrefDefault() { return Default; } \ PrefTemplate mPref##Name // Custom Definitions. -#ifdef MOZ_GMP #define GMP_DEFAULT_ASYNC_SHUTDOWN_TIMEOUT 3000 -#endif #define SUSPEND_BACKGROUND_VIDEO_DELAY_MS 10000 #define TEST_PREFERENCE_FAKE_RECOGNITION_SERVICE "media.webspeech.test.fake_recognition_service" @@ -98,13 +96,9 @@ private: // PlatformDecoderModule DECL_MEDIA_PREF("media.apple.forcevda", AppleForceVDA, bool, false); -#ifdef MOZ_GMP DECL_MEDIA_PREF("media.gmp.insecure.allow", GMPAllowInsecure, bool, false); DECL_MEDIA_PREF("media.gmp.async-shutdown-timeout", GMPAsyncShutdownTimeout, uint32_t, GMP_DEFAULT_ASYNC_SHUTDOWN_TIMEOUT); -#endif -#ifdef MOZ_EME DECL_MEDIA_PREF("media.eme.enabled", EMEEnabled, bool, false); -#endif DECL_MEDIA_PREF("media.use-blank-decoder", PDMUseBlankDecoder, bool, false); DECL_MEDIA_PREF("media.gpu-process-decoder", PDMUseGPUDecoder, bool, false); #ifdef MOZ_FFMPEG @@ -130,11 +124,9 @@ private: DECL_MEDIA_PREF("media.decoder.fuzzing.enabled", PDMFuzzingEnabled, bool, false); DECL_MEDIA_PREF("media.decoder.fuzzing.video-output-minimum-interval-ms", PDMFuzzingInterval, uint32_t, 0); DECL_MEDIA_PREF("media.decoder.fuzzing.dont-delay-inputexhausted", PDMFuzzingDelayInputExhausted, bool, true); -#ifdef MOZ_GMP DECL_MEDIA_PREF("media.gmp.decoder.enabled", PDMGMPEnabled, bool, true); DECL_MEDIA_PREF("media.gmp.decoder.aac", GMPAACPreferred, uint32_t, 0); DECL_MEDIA_PREF("media.gmp.decoder.h264", GMPH264Preferred, uint32_t, 0); -#endif // MediaDecoderStateMachine DECL_MEDIA_PREF("media.suspend-bkgnd-video.enabled", MDSMSuspendBackgroundVideoEnabled, bool, false); diff --git a/dom/media/gtest/moz.build b/dom/media/gtest/moz.build index e9538c2712..512d0a0870 100644 --- a/dom/media/gtest/moz.build +++ b/dom/media/gtest/moz.build @@ -10,6 +10,9 @@ UNIFIED_SOURCES += [ 'TestAudioMixer.cpp', 'TestAudioPacketizer.cpp', 'TestAudioSegment.cpp', + 'TestGMPCrossOrigin.cpp', + 'TestGMPRemoveAndDelete.cpp', + 'TestGMPUtils.cpp', 'TestIntervalSet.cpp', 'TestMediaDataDecoder.cpp', 'TestMediaEventSource.cpp', @@ -24,13 +27,6 @@ UNIFIED_SOURCES += [ 'TestWebMBuffered.cpp', ] -if CONFIG['MOZ_GMP']: - UNIFIED_SOURCES += [ - 'TestGMPCrossOrigin.cpp', - 'TestGMPRemoveAndDelete.cpp', - 'TestGMPUtils.cpp', - ] - if CONFIG['MOZ_WEBM_ENCODER']: UNIFIED_SOURCES += [ 'TestVideoTrackEncoder.cpp', @@ -63,15 +59,11 @@ LOCAL_INCLUDES += [ '/dom/media', '/dom/media/encoder', '/dom/media/fmp4', + '/dom/media/gmp', '/security/certverifier', '/security/pkix/include', ] -if CONFIG['MOZ_GMP']: - LOCAL_INCLUDES += [ - '/dom/media/gmp', - ] - FINAL_LIBRARY = 'xul-gtest' if CONFIG['GNU_CXX']: diff --git a/dom/media/moz.build b/dom/media/moz.build index 5cf9b44067..08dbcea226 100644 --- a/dom/media/moz.build +++ b/dom/media/moz.build @@ -21,6 +21,9 @@ with Files('GetUserMedia*'): DIRS += [ 'encoder', 'flac', + 'gmp', + 'gmp-plugin', + 'gmp-plugin-openh264', 'imagecapture', 'ipc', 'mediasink', @@ -47,13 +50,6 @@ if CONFIG['MOZ_WEBRTC']: if CONFIG['MOZ_EME']: DIRS += ['eme'] -if CONFIG['MOZ_GMP']: - DIRS += [ - 'gmp', - 'gmp-plugin', - 'gmp-plugin-openh264', - ] - TEST_DIRS += [ 'gtest', ] diff --git a/dom/media/platforms/PDMFactory.cpp b/dom/media/platforms/PDMFactory.cpp index cf4fba4b01..17153f8246 100644 --- a/dom/media/platforms/PDMFactory.cpp +++ b/dom/media/platforms/PDMFactory.cpp @@ -18,9 +18,7 @@ #ifdef MOZ_APPLEMEDIA #include "AppleDecoderModule.h" #endif -#ifdef MOZ_GMP #include "GMPDecoderModule.h" -#endif #include "mozilla/CDMProxy.h" #include "mozilla/ClearOnShutdown.h" @@ -223,11 +221,9 @@ PDMFactory::CreateDecoder(const CreateDecoderParams& aParams) if (mFFmpegFailedToLoad) { diagnostics->SetFFmpegFailedToLoad(); } -#ifdef MOZ_GMP if (mGMPPDMFailedToStartup) { diagnostics->SetGMPPDMFailedToStartup(); } -#endif } for (auto& current : mCurrentPDMs) { @@ -397,14 +393,12 @@ PDMFactory::CreatePDMs() m = new AgnosticDecoderModule(); StartupPDM(m); -#ifdef MOZ_GMP if (MediaPrefs::PDMGMPEnabled()) { m = new GMPDecoderModule(); mGMPPDMFailedToStartup = !StartupPDM(m); } else { mGMPPDMFailedToStartup = false; } -#endif } void @@ -437,11 +431,9 @@ PDMFactory::GetDecoder(const TrackInfo& aTrackInfo, if (mFFmpegFailedToLoad) { aDiagnostics->SetFFmpegFailedToLoad(); } -#ifdef MOZ_GMP if (mGMPPDMFailedToStartup) { aDiagnostics->SetGMPPDMFailedToStartup(); } -#endif } RefPtr pdm; diff --git a/dom/media/platforms/PDMFactory.h b/dom/media/platforms/PDMFactory.h index 270030600a..5f34221a54 100644 --- a/dom/media/platforms/PDMFactory.h +++ b/dom/media/platforms/PDMFactory.h @@ -70,9 +70,7 @@ private: bool mWMFFailedToLoad = false; bool mFFmpegFailedToLoad = false; -#ifdef MOZ_GMP bool mGMPPDMFailedToStartup = false; -#endif void EnsureInit() const; template friend class StaticAutoPtr; diff --git a/dom/media/platforms/PlatformDecoderModule.h b/dom/media/platforms/PlatformDecoderModule.h index 1dff3f90f8..ae408272b9 100644 --- a/dom/media/platforms/PlatformDecoderModule.h +++ b/dom/media/platforms/PlatformDecoderModule.h @@ -16,9 +16,7 @@ #include "mozilla/layers/KnowsCompositor.h" #include "nsTArray.h" #include "mozilla/RefPtr.h" -#ifdef MOZ_GMP #include "GMPService.h" -#endif #include #include "MediaResult.h" @@ -40,9 +38,7 @@ class RemoteDecoderModule; class MediaDataDecoder; class MediaDataDecoderCallback; class TaskQueue; -#ifdef MOZ_EME class CDMProxy; -#endif static LazyLogModule sPDMLog("PlatformDecoderModule"); @@ -85,9 +81,7 @@ struct MOZ_STACK_CLASS CreateDecoderParams final { layers::ImageContainer* mImageContainer = nullptr; MediaResult* mError = nullptr; RefPtr mKnowsCompositor; -#ifdef MOZ_GMP RefPtr mCrashHelper; -#endif bool mUseBlankDecoder = false; private: @@ -96,9 +90,7 @@ private: void Set(DecoderDoctorDiagnostics* aDiagnostics) { mDiagnostics = aDiagnostics; } void Set(layers::ImageContainer* aImageContainer) { mImageContainer = aImageContainer; } void Set(MediaResult* aError) { mError = aError; } -#ifdef MOZ_GMP void Set(GMPCrashHelper* aCrashHelper) { mCrashHelper = aCrashHelper; } -#endif void Set(bool aUseBlankDecoder) { mUseBlankDecoder = aUseBlankDecoder; } void Set(layers::KnowsCompositor* aKnowsCompositor) { mKnowsCompositor = aKnowsCompositor; } template diff --git a/dom/media/platforms/moz.build b/dom/media/platforms/moz.build index 8e89f88554..6312787ae2 100644 --- a/dom/media/platforms/moz.build +++ b/dom/media/platforms/moz.build @@ -29,15 +29,13 @@ UNIFIED_SOURCES += [ ] DIRS += [ + 'agnostic/gmp', 'omx' ] if CONFIG['MOZ_EME']: DIRS += ['agnostic/eme'] -if CONFIG['MOZ_GMP']: - DIRS += ['agnostic/gmp'] - if CONFIG['MOZ_WMF']: DIRS += [ 'wmf' ]; diff --git a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp index a7c15c7483..c04f301288 100644 --- a/dom/media/platforms/wmf/WMFVideoMFTManager.cpp +++ b/dom/media/platforms/wmf/WMFVideoMFTManager.cpp @@ -25,9 +25,7 @@ #include "IMFYCbCrImage.h" #include "mozilla/WindowsVersion.h" #include "nsPrintfCString.h" -#ifdef MOZ_GMP #include "GMPUtils.h" // For SplitAt. TODO: Move SplitAt to a central place. -#endif #include "MP4Decoder.h" #include "VPXDecoder.h" #include "mozilla/SyncRunnable.h" @@ -68,23 +66,6 @@ const CLSID CLSID_WebmMfVpxDec = namespace mozilla { -#ifndef MOZ_GMP -// Utility function only used when not building GMP -// XXXMC: Perhaps make this available globally? -void -SplitAt(const char* aDelims, - const nsACString& aInput, - nsTArray& aOutTokens) -{ - nsAutoCString str(aInput); - char* end = str.BeginWriting(); - const char* start = nullptr; - while (!!(start = NS_strtok(aDelims, &end))) { - aOutTokens.AppendElement(nsCString(start)); - } -} -#endif - LayersBackend GetCompositorBackendType(layers::KnowsCompositor* aKnowsCompositor) { diff --git a/dom/media/platforms/wrappers/H264Converter.cpp b/dom/media/platforms/wrappers/H264Converter.cpp index 5c39d22711..75da31811d 100644 --- a/dom/media/platforms/wrappers/H264Converter.cpp +++ b/dom/media/platforms/wrappers/H264Converter.cpp @@ -25,9 +25,7 @@ H264Converter::H264Converter(PlatformDecoderModule* aPDM, , mTaskQueue(aParams.mTaskQueue) , mCallback(aParams.mCallback) , mDecoder(nullptr) -#ifdef MOZ_GMP , mGMPCrashHelper(aParams.mCrashHelper) -#endif , mNeedAVCC(aPDM->DecoderNeedsConversion(aParams.mConfig) == PlatformDecoderModule::ConversionRequired::kNeedAVCC) , mLastError(NS_OK) @@ -203,12 +201,8 @@ H264Converter::CreateDecoder(DecoderDoctorDiagnostics* aDiagnostics) mCallback, aDiagnostics, mImageContainer, -#ifdef MOZ_GMP mKnowsCompositor, mGMPCrashHelper -#else - mKnowsCompositor -#endif }); if (!mDecoder) { diff --git a/dom/media/platforms/wrappers/H264Converter.h b/dom/media/platforms/wrappers/H264Converter.h index 10ac232c7a..7c977315af 100644 --- a/dom/media/platforms/wrappers/H264Converter.h +++ b/dom/media/platforms/wrappers/H264Converter.h @@ -62,9 +62,7 @@ private: MediaDataDecoderCallback* mCallback; RefPtr mDecoder; MozPromiseRequestHolder mInitPromiseRequest; -#ifdef MOZ_GMP RefPtr mGMPCrashHelper; -#endif bool mNeedAVCC; nsresult mLastError; bool mNeedKeyframe = true; diff --git a/dom/media/test/mochitest.ini b/dom/media/test/mochitest.ini index 516c2beb03..742ac1b1c5 100644 --- a/dom/media/test/mochitest.ini +++ b/dom/media/test/mochitest.ini @@ -425,9 +425,7 @@ support-files = dirac.ogg^headers^ dynamic_redirect.sjs dynamic_resource.sjs -#ifdef MOZ_EME eme.js -#endif file_access_controls.html flac-s24.flac flac-s24.flac^headers^ @@ -684,7 +682,6 @@ tags=capturestream [test_decoder_disable.html] [test_defaultMuted.html] [test_delay_load.html] -#ifdef MOZ_EME [test_eme_session_callable_value.html] [test_eme_canvas_blocked.html] skip-if = toolkit == 'android' # bug 1149374 @@ -715,16 +712,13 @@ tags=msg capturestream skip-if = toolkit == 'android' # bug 1149374 [test_eme_waitingforkey.html] skip-if = toolkit == 'android' # bug 1149374 -#endif [test_empty_resource.html] [test_error_in_video_document.html] [test_error_on_404.html] [test_fastSeek.html] [test_fastSeek-forwards.html] -#ifdef MOZ_GMP [test_gmp_playback.html] skip-if = (os != 'win' || os_version == '5.1') # Only gmp-clearkey on Windows Vista and later decodes -#endif [test_imagecapture.html] [test_info_leak.html] [test_invalid_reject.html] diff --git a/dom/media/webaudio/BufferDecoder.cpp b/dom/media/webaudio/BufferDecoder.cpp index 82438f94c4..ddd9e7d1bd 100644 --- a/dom/media/webaudio/BufferDecoder.cpp +++ b/dom/media/webaudio/BufferDecoder.cpp @@ -7,23 +7,15 @@ #include "nsISupports.h" #include "MediaResource.h" -#ifdef MOZ_GMP #include "GMPService.h" -#endif namespace mozilla { NS_IMPL_ISUPPORTS0(BufferDecoder) -#ifdef MOZ_GMP BufferDecoder::BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper) -#else -BufferDecoder::BufferDecoder(MediaResource* aResource) -#endif : mResource(aResource) -#ifdef MOZ_GMP , mCrashHelper(aCrashHelper) -#endif { MOZ_ASSERT(NS_IsMainThread()); MOZ_COUNT_CTOR(BufferDecoder); @@ -75,12 +67,10 @@ BufferDecoder::GetOwner() const return nullptr; } -#ifdef MOZ_GMP already_AddRefed BufferDecoder::GetCrashHelper() { return do_AddRef(mCrashHelper); } -#endif } // namespace mozilla diff --git a/dom/media/webaudio/BufferDecoder.h b/dom/media/webaudio/BufferDecoder.h index 6f1f5133b0..2c6c49454d 100644 --- a/dom/media/webaudio/BufferDecoder.h +++ b/dom/media/webaudio/BufferDecoder.h @@ -23,11 +23,7 @@ class BufferDecoder final : public AbstractMediaDecoder public: // This class holds a weak pointer to MediaResource. It's the responsibility // of the caller to manage the memory of the MediaResource object. -#ifdef MOZ_GMP explicit BufferDecoder(MediaResource* aResource, GMPCrashHelper* aCrashHelper); -#else - explicit BufferDecoder(MediaResource* aResource); -#endif NS_DECL_THREADSAFE_ISUPPORTS @@ -43,17 +39,13 @@ public: MediaDecoderOwner* GetOwner() const final override; -#ifdef MOZ_GMP already_AddRefed GetCrashHelper() override; -#endif private: virtual ~BufferDecoder(); RefPtr mTaskQueueIdentity; RefPtr mResource; -#ifdef MOZ_GMP RefPtr mCrashHelper; -#endif }; } // namespace mozilla diff --git a/dom/media/webaudio/MediaBufferDecoder.cpp b/dom/media/webaudio/MediaBufferDecoder.cpp index 2f74329d2c..0d8593e937 100644 --- a/dom/media/webaudio/MediaBufferDecoder.cpp +++ b/dom/media/webaudio/MediaBufferDecoder.cpp @@ -24,9 +24,7 @@ #include "WebAudioUtils.h" #include "mozilla/dom/Promise.h" #include "nsPrintfCString.h" -#ifdef MOZ_GMP #include "GMPService.h" -#endif namespace mozilla { @@ -182,7 +180,6 @@ MediaDecodeTask::Run() return NS_OK; } -#ifdef MOZ_GMP class BufferDecoderGMPCrashHelper : public GMPCrashHelper { public: @@ -200,7 +197,6 @@ public: private: nsWeakPtr mParent; }; -#endif bool MediaDecodeTask::CreateReader() @@ -219,12 +215,8 @@ MediaDecodeTask::CreateReader() mLength, principal, mContentType); MOZ_ASSERT(!mBufferDecoder); -#ifdef MOZ_GMP mBufferDecoder = new BufferDecoder(resource, new BufferDecoderGMPCrashHelper(mDecodeJob.mContext->GetParentObject())); -#else - mBufferDecoder = new BufferDecoder(resource); -#endif // If you change this list to add support for new decoders, please consider // updating HTMLMediaElement::CreateDecoder as well. diff --git a/gfx/layers/ipc/PAPZCTreeManager.ipdl b/gfx/layers/ipc/PAPZCTreeManager.ipdl index 134a222adf..21d899f91c 100644 --- a/gfx/layers/ipc/PAPZCTreeManager.ipdl +++ b/gfx/layers/ipc/PAPZCTreeManager.ipdl @@ -8,10 +8,6 @@ include "ipc/nsGUIEventIPC.h"; include protocol PCompositorBridge; -// Workaround to prevent error if PContentChild.cpp & PAPZCTreeManagerChild.cpp -// are put into different UnifiedProtocolsXX.cpp files. -include "mozilla/dom/TabMessageUtils.h"; - using CSSRect from "Units.h"; using LayoutDeviceCoord from "Units.h"; using LayoutDeviceIntPoint from "Units.h"; diff --git a/ipc/app/moz.build b/ipc/app/moz.build index a67e9dc66d..33f06db62b 100644 --- a/ipc/app/moz.build +++ b/ipc/app/moz.build @@ -18,14 +18,12 @@ LOCAL_INCLUDES += [ # We link GMPLoader into plugin-container on desktop so that its code is # covered by the desktop DRM vendor's voucher. -if CONFIG['MOZ_GMP']: - SOURCES += [ - '../../dom/media/gmp/GMPLoader.cpp', - ] - - USE_LIBS += [ - 'rlz', - ] +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': diff --git a/ipc/contentproc/plugin-container.cpp b/ipc/contentproc/plugin-container.cpp index 5e5f6d8fbb..4cad1f2d84 100644 --- a/ipc/contentproc/plugin-container.cpp +++ b/ipc/contentproc/plugin-container.cpp @@ -19,7 +19,6 @@ #include #endif -#ifdef MOZ_GMP #include "GMPLoader.h" mozilla::gmp::SandboxStarter* @@ -27,7 +26,6 @@ MakeSandboxStarter() { return nullptr; } -#endif int content_process_main(int argc, char* argv[]) @@ -38,9 +36,7 @@ content_process_main(int argc, char* argv[]) return 3; } -#ifdef MOZ_GMP XREChildData childData; -#endif XRE_SetProcessType(argv[--argc]); @@ -54,19 +50,15 @@ content_process_main(int argc, char* argv[]) } #endif #ifdef MOZ_PLUGIN_CONTAINER -#ifdef MOZ_GMP // On desktop, the GMPLoader lives in plugin-container, so that its // code can be covered by an EME/GMP vendor's voucher. nsAutoPtr starter(MakeSandboxStarter()); if (XRE_GetProcessType() == GeckoProcessType_GMPlugin) { childData.gmpLoader = mozilla::gmp::CreateGMPLoader(starter); } +#endif nsresult rv = XRE_InitChildProcess(argc, argv, &childData); -#else - nsresult rv = XRE_InitChildProcess(argc, argv); -#endif NS_ENSURE_SUCCESS(rv, 1); -#endif return 0; } diff --git a/layout/build/nsLayoutModule.cpp b/layout/build/nsLayoutModule.cpp index 2d4866b00b..3c6f5f3aa5 100644 --- a/layout/build/nsLayoutModule.cpp +++ b/layout/build/nsLayoutModule.cpp @@ -175,9 +175,7 @@ static void Shutdown(); #include "MediaManager.h" -#ifdef MOZ_GMP #include "GMPService.h" -#endif #include "nsScriptError.h" @@ -192,9 +190,7 @@ using mozilla::dom::workers::WorkerDebuggerManager; using mozilla::dom::UDPSocketChild; using mozilla::dom::time::TimeService; using mozilla::net::StreamingProtocolControllerService; -#ifdef MOZ_GMP using mozilla::gmp::GeckoMediaPluginService; -#endif #define NS_EDITORCOMMANDTABLE_CID \ { 0x4f5e62b8, 0xd659, 0x4156, \ @@ -520,9 +516,7 @@ NS_GENERIC_FACTORY_CONSTRUCTOR(nsStructuredCloneContainer) NS_GENERIC_FACTORY_CONSTRUCTOR(OSFileConstantsService) NS_GENERIC_FACTORY_CONSTRUCTOR(UDPSocketChild) -#ifdef MOZ_GMP NS_GENERIC_FACTORY_SINGLETON_CONSTRUCTOR(GeckoMediaPluginService, GeckoMediaPluginService::GetGeckoMediaPluginService) -#endif NS_GENERIC_FACTORY_CONSTRUCTOR(nsScriptError) @@ -667,9 +661,7 @@ NS_DEFINE_NAMED_CID(NS_SYNTHVOICEREGISTRY_CID); NS_DEFINE_NAMED_CID(NS_ACCESSIBILITY_SERVICE_CID); #endif -#ifdef MOZ_GMP NS_DEFINE_NAMED_CID(GECKO_MEDIA_PLUGIN_SERVICE_CID); -#endif NS_DEFINE_NAMED_CID(TEXT_INPUT_PROCESSOR_CID); @@ -912,9 +904,7 @@ static const mozilla::Module::CIDEntry kLayoutCIDs[] = { { &kNS_POWERMANAGERSERVICE_CID, false, nullptr, nsIPowerManagerServiceConstructor, Module::ALLOW_IN_GPU_PROCESS }, { &kOSFILECONSTANTSSERVICE_CID, true, nullptr, OSFileConstantsServiceConstructor }, { &kUDPSOCKETCHILD_CID, false, nullptr, UDPSocketChildConstructor }, -#ifdef MOZ_GMP { &kGECKO_MEDIA_PLUGIN_SERVICE_CID, true, nullptr, GeckoMediaPluginServiceConstructor }, -#endif { &kNS_TIMESERVICE_CID, false, nullptr, nsITimeServiceConstructor }, { &kNS_MEDIASTREAMCONTROLLERSERVICE_CID, false, nullptr, nsIStreamingProtocolControllerServiceConstructor }, { &kNS_MEDIAMANAGERSERVICE_CID, false, nullptr, nsIMediaManagerServiceConstructor }, @@ -1038,9 +1028,7 @@ static const mozilla::Module::ContractIDEntry kLayoutContracts[] = { { "@mozilla.org/accessibilityService;1", &kNS_ACCESSIBILITY_SERVICE_CID }, { "@mozilla.org/accessibleRetrieval;1", &kNS_ACCESSIBILITY_SERVICE_CID }, #endif -#ifdef MOZ_GMP { "@mozilla.org/gecko-media-plugin-service;1", &kGECKO_MEDIA_PLUGIN_SERVICE_CID }, -#endif { "@mozilla.org/text-input-processor;1", &kTEXT_INPUT_PROCESSOR_CID }, { NS_SCRIPTERROR_CONTRACTID, &kNS_SCRIPTERROR_CID }, { nullptr } diff --git a/modules/libpref/init/all.js b/modules/libpref/init/all.js index 7a82772298..a10b1213c2 100644 --- a/modules/libpref/init/all.js +++ b/modules/libpref/init/all.js @@ -418,11 +418,9 @@ pref("media.libavcodec.allow-obsolete", false); #if defined(MOZ_FFVPX) pref("media.ffvpx.enabled", true); #endif -#ifdef MOZ_GMP pref("media.gmp.decoder.enabled", false); pref("media.gmp.decoder.aac", 0); pref("media.gmp.decoder.h264", 0); -#endif #ifdef MOZ_RAW pref("media.raw.enabled", true); #endif @@ -439,14 +437,13 @@ pref("media.apple.mp3.enabled", true); pref("media.apple.mp4.enabled", true); #endif -#ifdef MOZ_GMP // GMP storage version number. At startup we check the version against // media.gmp.storage.version.observed, and if the versions don't match, // we clear storage and set media.gmp.storage.version.observed=expected. // This provides a mechanism to clear GMP storage when non-compatible // changes are made. pref("media.gmp.storage.version.expected", 1); -#endif + // Filter what triggers user notifications. // See DecoderDoctorDocumentWatcher::ReportAnalysis for details. pref("media.decoder-doctor.notifications-allowed", "MediaWMFNeeded,MediaWidevineNoWMFNoSilverlight,MediaCannotInitializePulseAudio,MediaCannotPlayNoDecoders,MediaUnsupportedLibavcodec"); @@ -5069,7 +5066,6 @@ pref("browser.search.reset.whitelist", ""); pref("browser.search.official", true); #endif -#ifdef MOZ_GMP // GMPInstallManager prefs // User-settable override to media.gmp-manager.url for testing purposes. @@ -5105,7 +5101,6 @@ pref("media.gmp-manager.certs.1.issuerName", "CN=DigiCert SHA2 Secure Server CA, pref("media.gmp-manager.certs.1.commonName", "aus5.mozilla.org"); pref("media.gmp-manager.certs.2.issuerName", "CN=thawte SSL CA - G2,O=\"thawte, Inc.\",C=US"); pref("media.gmp-manager.certs.2.commonName", "aus5.mozilla.org"); -#endif // Whether or not to perform reader mode article parsing on page load. // If this pref is disabled, we will never show a reader mode icon in the toolbar. diff --git a/old-configure.in b/old-configure.in index 86ba89daf3..cd8ef97ad9 100644 --- a/old-configure.in +++ b/old-configure.in @@ -2061,7 +2061,6 @@ MOZ_VORBIS= MOZ_TREMOR= MOZ_SAMPLE_TYPE_FLOAT32= MOZ_SAMPLE_TYPE_S16= -MOZ_GMP= MOZ_WEBRTC= MOZ_PEERCONNECTION= MOZ_SRTP= @@ -2811,24 +2810,6 @@ else AC_SUBST(MOZ_SAMPLE_TYPE_FLOAT32) fi -dnl ======================================================== -dnl = Enable Gecko Media Plugins -dnl ======================================================== - -if test -n "$MOZ_EME"; then - MOZ_GMP=1 -fi - -if test -n "$MOZ_WEBRTC"; then - MOZ_GMP=1 -fi - -if test -n "$MOZ_GMP"; then - AC_DEFINE(MOZ_GMP) -fi - -AC_SUBST(MOZ_GMP) - dnl ======================================================== dnl = Enable Raw Codecs dnl ======================================================== diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py index 7d3943a9ad..a99ad6d47d 100644 --- a/python/mozbuild/mozbuild/mach_commands.py +++ b/python/mozbuild/mozbuild/mach_commands.py @@ -949,7 +949,6 @@ class GTestCommands(MachCommandBase): # https://code.google.com/p/googletest/wiki/AdvancedGuide#Running_Test_Programs:_Advanced_Options gtest_env = {b'GTEST_FILTER': gtest_filter} -#ifdef MOZ_GMP # Note: we must normalize the path here so that gtest on Windows sees # a MOZ_GMP_PATH which has only Windows dir seperators, because # nsILocalFile cannot open the paths with non-Windows dir seperators. @@ -959,7 +958,6 @@ class GTestCommands(MachCommandBase): os.path.join(xre_path, p, "1.0") for p in ('gmp-fake', 'gmp-fakeopenh264') ) -#endif gtest_env[b"MOZ_RUN_GTEST"] = b"True" diff --git a/testing/mochitest/runtests.py b/testing/mochitest/runtests.py index 07547dd238..6763952af9 100644 --- a/testing/mochitest/runtests.py +++ b/testing/mochitest/runtests.py @@ -1499,7 +1499,6 @@ toolbar#nav-bar { if not self.disable_leak_checking: browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file -#ifdef MOZ_GMP try: gmp_path = self.getGMPPluginPath(options) if gmp_path is not None: @@ -1507,7 +1506,6 @@ toolbar#nav-bar { except EnvironmentError: self.log.error('Could not find path to gmp-fake plugin!') return None -#endif if options.fatalAssertions: browserEnv["XPCOM_DEBUG_BREAK"] = "stack-and-abort" diff --git a/toolkit/components/crashes/CrashManager.jsm b/toolkit/components/crashes/CrashManager.jsm index 8b8c873d31..537ab328d9 100644 --- a/toolkit/components/crashes/CrashManager.jsm +++ b/toolkit/components/crashes/CrashManager.jsm @@ -128,10 +128,8 @@ this.CrashManager.prototype = Object.freeze({ // A crash in a plugin process. PROCESS_TYPE_PLUGIN: "plugin", -#ifdef MOZ_GMP // A crash in a Gecko media plugin process. PROCESS_TYPE_GMPLUGIN: "gmplugin", -#endif // A crash in the GPU process. PROCESS_TYPE_GPU: "gpu", diff --git a/toolkit/components/crashes/CrashService.js b/toolkit/components/crashes/CrashService.js index 1bafd99cec..56f8b69e74 100644 --- a/toolkit/components/crashes/CrashService.js +++ b/toolkit/components/crashes/CrashService.js @@ -34,11 +34,9 @@ CrashService.prototype = Object.freeze({ case Ci.nsICrashService.PROCESS_TYPE_PLUGIN: processType = Services.crashmanager.PROCESS_TYPE_PLUGIN; break; -#ifdef MOZ_GMP case Ci.nsICrashService.PROCESS_TYPE_GMPLUGIN: processType = Services.crashmanager.PROCESS_TYPE_GMPLUGIN; break; -#endif case Ci.nsICrashService.PROCESS_TYPE_GPU: processType = Services.crashmanager.PROCESS_TYPE_GPU; break; diff --git a/toolkit/content/jar.mn b/toolkit/content/jar.mn index c64377aeef..a9e27643a2 100644 --- a/toolkit/content/jar.mn +++ b/toolkit/content/jar.mn @@ -52,7 +52,7 @@ toolkit.jar: #ifdef MOZ_PHOENIX content/global/logopage.xhtml #endif -* content/global/process-content.js + content/global/process-content.js content/global/resetProfile.css content/global/resetProfile.js content/global/resetProfile.xul @@ -122,8 +122,6 @@ toolkit.jar: content/global/macWindowMenu.js #endif content/global/svg/svgBindings.xml (/layout/svg/resources/content/svgBindings.xml) -#ifdef MOZ_GMP content/global/gmp-sources/eme-adobe.json (gmp-sources/eme-adobe.json) content/global/gmp-sources/openh264.json (gmp-sources/openh264.json) content/global/gmp-sources/widevinecdm.json (gmp-sources/widevinecdm.json) -#endif diff --git a/toolkit/content/process-content.js b/toolkit/content/process-content.js index 326a86a879..2ff8f908a9 100644 --- a/toolkit/content/process-content.js +++ b/toolkit/content/process-content.js @@ -14,14 +14,12 @@ Cu.import("resource://gre/modules/Services.jsm"); const gInContentProcess = Services.appinfo.processType == Ci.nsIXULRuntime.PROCESS_TYPE_CONTENT; -#ifdef MOZ_GMP Services.cpmm.addMessageListener("gmp-plugin-crash", msg => { let gmpservice = Cc["@mozilla.org/gecko-media-plugin-service;1"] .getService(Ci.mozIGeckoMediaPluginService); gmpservice.RunPluginCrashCallbacks(msg.data.pluginID, msg.data.pluginName); }); -#endif if (gInContentProcess) { let ProcessObserver = { diff --git a/toolkit/forgetaboutsite/ForgetAboutSite.jsm b/toolkit/forgetaboutsite/ForgetAboutSite.jsm index af3572bb24..9d7e512a8f 100644 --- a/toolkit/forgetaboutsite/ForgetAboutSite.jsm +++ b/toolkit/forgetaboutsite/ForgetAboutSite.jsm @@ -84,7 +84,6 @@ this.ForgetAboutSite = { throw new Error("Exception thrown while clearning cookies: " + ex); })); -#ifdef MOZ_EME // EME promises.push(Task.spawn(function*() { let mps = Cc["@mozilla.org/gecko-media-plugin-service;1"]. @@ -93,7 +92,6 @@ this.ForgetAboutSite = { }).catch(ex => { throw new Error("Exception thrown while clearing Encrypted Media Extensions: " + ex); })); -#endif // Plugin data const phInterface = Ci.nsIPluginHost; diff --git a/toolkit/forgetaboutsite/moz.build b/toolkit/forgetaboutsite/moz.build index 1080497827..9b2f375c37 100644 --- a/toolkit/forgetaboutsite/moz.build +++ b/toolkit/forgetaboutsite/moz.build @@ -3,4 +3,4 @@ # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -EXTRA_PP_JS_MODULES += ['ForgetAboutSite.jsm'] +EXTRA_JS_MODULES += ['ForgetAboutSite.jsm'] diff --git a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties index 307d6f1964..c5de4f0c04 100644 --- a/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties +++ b/toolkit/locales/en-US/chrome/mozapps/extensions/extensions.properties @@ -58,9 +58,7 @@ notification.installError=There was an error installing %1$S. notification.installError.retry=Try again notification.installError.retry.tooltip=Try downloading and installing this add-on again #LOCALIZATION NOTE (notification.gmpPending) %1$S is the add-on name. -#ifdef MOZ_GMP notification.gmpPending=%1$S will be installed shortly. -#endif #LOCALIZATION NOTE (contributionAmount2) %S is the currency amount recommended for contributions contributionAmount2=Suggested Contribution: %S @@ -103,9 +101,7 @@ details.notification.uninstall=%1$S will be uninstalled after you restart %2$S. #LOCALIZATION NOTE (details.notification.upgrade) %1$S is the add-on name, %2$S is brand name details.notification.upgrade=%1$S will be updated after you restart %2$S. #LOCALIZATION NOTE (details.notification.gmpPending) %1$S is the add-on name -#ifdef MOZ_GMP details.notification.gmpPending=%1$S will be installed shortly. -#endif installFromFile.dialogTitle=Select add-on to install installFromFile.filterName=Add-ons diff --git a/toolkit/locales/jar.mn b/toolkit/locales/jar.mn index 037c84be3d..6540901ebc 100644 --- a/toolkit/locales/jar.mn +++ b/toolkit/locales/jar.mn @@ -96,7 +96,7 @@ locale/@AB_CD@/mozapps/downloads/downloads.dtd (%chrome/mozapps/downloads/downloads.dtd) locale/@AB_CD@/mozapps/downloads/downloads.properties (%chrome/mozapps/downloads/downloads.properties) * locale/@AB_CD@/mozapps/extensions/extensions.dtd (%chrome/mozapps/extensions/extensions.dtd) -* locale/@AB_CD@/mozapps/extensions/extensions.properties (%chrome/mozapps/extensions/extensions.properties) + locale/@AB_CD@/mozapps/extensions/extensions.properties (%chrome/mozapps/extensions/extensions.properties) locale/@AB_CD@/mozapps/extensions/blocklist.dtd (%chrome/mozapps/extensions/blocklist.dtd) locale/@AB_CD@/mozapps/extensions/about.dtd (%chrome/mozapps/extensions/about.dtd) locale/@AB_CD@/mozapps/extensions/selectAddons.dtd (%chrome/mozapps/extensions/selectAddons.dtd) diff --git a/toolkit/mozapps/extensions/content/extensions.js b/toolkit/mozapps/extensions/content/extensions.js index d5e61a40ab..2ca3898f17 100644 --- a/toolkit/mozapps/extensions/content/extensions.js +++ b/toolkit/mozapps/extensions/content/extensions.js @@ -1014,11 +1014,7 @@ var gViewController = { cmd_showItemPreferences: { isEnabled: function cmd_showItemPreferences_isEnabled(aAddon) { if (!aAddon || -#ifdef MOZ_GMP (!aAddon.isActive && !aAddon.isGMPlugin) || -#else - !aAddon.isActive || -#endif !aAddon.optionsURL) { return false; } @@ -2764,15 +2760,11 @@ var gDetailView = { // The following is part of an awful hack to include the licenses for GMP // plugins without having bug 624602 fixed yet, and intentionally ignores // localisation. -#ifdef MOZ_GMP if (aAddon.isGMPlugin) { fullDesc.innerHTML = aAddon.fullDescription; } else { fullDesc.textContent = aAddon.fullDescription; } -#else - fullDesc.textContent = aAddon.fullDescription; -#endif fullDesc.hidden = false; } else { @@ -3048,7 +3040,6 @@ var gDetailView = { errorLink.value = gStrings.ext.GetStringFromName("details.notification.vulnerableNoUpdate.link"); errorLink.href = this._addon.blocklistURL; errorLink.hidden = false; -#ifdef MOZ_GMP } else if (this._addon.isGMPlugin && !this._addon.isInstalled && this._addon.isActive) { this.node.setAttribute("notification", "warning"); @@ -3056,7 +3047,6 @@ var gDetailView = { warning.textContent = gStrings.ext.formatStringFromName("details.notification.gmpPending", [this._addon.name], 1); -#endif } else { this.node.removeAttribute("notification"); } diff --git a/toolkit/mozapps/extensions/content/extensions.xml b/toolkit/mozapps/extensions/content/extensions.xml index 23a3a4b7a7..dc67b71ad9 100644 --- a/toolkit/mozapps/extensions/content/extensions.xml +++ b/toolkit/mozapps/extensions/content/extensions.xml @@ -1334,14 +1334,12 @@ this._errorLink.value = gStrings.ext.GetStringFromName("notification.vulnerableNoUpdate.link"); this._errorLink.href = this.mAddon.blocklistURL; this._errorLink.hidden = false; -#ifdef MOZ_GMP } else if (this.mAddon.isGMPlugin && !this.mAddon.isInstalled && this.mAddon.isActive) { this.setAttribute("notification", "warning"); this._warning.textContent = gStrings.ext.formatStringFromName("notification.gmpPending", [this.mAddon.name], 1); -#endif } else { this.removeAttribute("notification"); #ifdef MOZ_PHOENIX_EXTENSIONS diff --git a/toolkit/mozapps/extensions/extensions.manifest b/toolkit/mozapps/extensions/extensions.manifest index 6c8f25de6d..b56152e100 100644 --- a/toolkit/mozapps/extensions/extensions.manifest +++ b/toolkit/mozapps/extensions/extensions.manifest @@ -13,6 +13,4 @@ contract @mozilla.org/addons/installtrigger;1 {9df8ef2b-94da-45c9-ab9f-132eb55fd category JavaScript-global-property InstallTrigger @mozilla.org/addons/installtrigger;1 category addon-provider-module PluginProvider resource://gre/modules/addons/PluginProvider.jsm -#ifdef MOZ_GMP category addon-provider-module GMPProvider resource://gre/modules/addons/GMPProvider.jsm -#endif diff --git a/toolkit/mozapps/extensions/internal/moz.build b/toolkit/mozapps/extensions/internal/moz.build index 0ffeaf76b9..3b967e0c6f 100644 --- a/toolkit/mozapps/extensions/internal/moz.build +++ b/toolkit/mozapps/extensions/internal/moz.build @@ -7,17 +7,13 @@ EXTRA_JS_MODULES.addons += [ 'AddonLogging.jsm', 'AddonRepository_SQLiteMigrator.jsm', 'Content.js', + 'GMPProvider.jsm', 'LightweightThemeImageOptimizer.jsm', 'PluginProvider.jsm', + 'ProductAddonChecker.jsm', 'SpellCheckDictionaryBootstrap.js', ] -if CONFIG['MOZ_GMP']: - EXTRA_JS_MODULES.addons += [ - 'GMPProvider.jsm', - 'ProductAddonChecker.jsm', - ] - EXTRA_PP_JS_MODULES.addons += [ 'AddonRepository.jsm', 'AddonUpdateChecker.jsm', diff --git a/toolkit/mozapps/extensions/jar.mn b/toolkit/mozapps/extensions/jar.mn index 61eb4acf20..c4d8874c9e 100644 --- a/toolkit/mozapps/extensions/jar.mn +++ b/toolkit/mozapps/extensions/jar.mn @@ -29,10 +29,8 @@ toolkit.jar: * content/mozapps/extensions/newaddon.js (content/newaddon.js) content/mozapps/extensions/setting.xml (content/setting.xml) content/mozapps/extensions/pluginPrefs.xul (content/pluginPrefs.xul) -#ifdef MOZ_GMP content/mozapps/extensions/gmpPrefs.xul (content/gmpPrefs.xul) content/mozapps/extensions/OpenH264-license.txt (content/OpenH264-license.txt) -#endif content/mozapps/xpinstall/xpinstallConfirm.xul (content/xpinstallConfirm.xul) content/mozapps/xpinstall/xpinstallConfirm.js (content/xpinstallConfirm.js) content/mozapps/xpinstall/xpinstallConfirm.css (content/xpinstallConfirm.css) diff --git a/toolkit/mozapps/extensions/moz.build b/toolkit/mozapps/extensions/moz.build index a7de1c54e7..480bd72e3d 100644 --- a/toolkit/mozapps/extensions/moz.build +++ b/toolkit/mozapps/extensions/moz.build @@ -19,9 +19,6 @@ EXTRA_COMPONENTS += [ 'amContentHandler.js', 'amInstallTrigger.js', 'amWebInstallListener.js', -] - -EXTRA_PP_COMPONENTS += [ 'extensions.manifest', ] @@ -31,13 +28,11 @@ EXTRA_JS_MODULES += [ 'LightweightThemeManager.jsm', ] -EXTRA_PP_JS_MODULES += ['AddonManager.jsm',] - -if CONFIG['MOZ_GMP']: - EXTRA_PP_JS_MODULES += [ - 'GMPInstallManager.jsm', - 'GMPUtils.jsm', - ] +EXTRA_PP_JS_MODULES += [ + 'AddonManager.jsm', + 'GMPInstallManager.jsm', + 'GMPUtils.jsm', +] # Additional debugging info is exposed in debug builds if CONFIG['MOZ_EM_DEBUG']: diff --git a/toolkit/xre/nsEmbedFunctions.cpp b/toolkit/xre/nsEmbedFunctions.cpp index bcedaa7792..4db3d36ffb 100644 --- a/toolkit/xre/nsEmbedFunctions.cpp +++ b/toolkit/xre/nsEmbedFunctions.cpp @@ -66,10 +66,8 @@ #include "mozilla/ipc/XPCShellEnvironment.h" #include "mozilla/WindowsDllBlocklist.h" -#ifdef MOZ_GMP #include "GMPProcessChild.h" #include "GMPLoader.h" -#endif #include "mozilla/gfx/GPUProcessImpl.h" #include "GeckoProfiler.h" @@ -94,11 +92,9 @@ using mozilla::dom::ContentProcess; using mozilla::dom::ContentParent; using mozilla::dom::ContentChild; -#ifdef MOZ_GMP using mozilla::gmp::GMPLoader; using mozilla::gmp::CreateGMPLoader; using mozilla::gmp::GMPProcessChild; -#endif using mozilla::ipc::TestShellParent; using mozilla::ipc::TestShellCommandParent; @@ -260,23 +256,17 @@ SetTaskbarGroupId(const nsString& aId) nsresult XRE_InitChildProcess(int aArgc, -#ifdef MOZ_GMP char* aArgv[], const XREChildData* aChildData) -#else - char* aArgv[]) -#endif { NS_ENSURE_ARG_MIN(aArgc, 2); NS_ENSURE_ARG_POINTER(aArgv); NS_ENSURE_ARG_POINTER(aArgv[0]); -#ifdef MOZ_GMP MOZ_ASSERT(aChildData); // On non-Fennec Gecko, the GMPLoader code resides in plugin-container, // and we must forward it through to the GMP code here. GMPProcessChild::SetGMPLoader(aChildData->gmpLoader.get()); -#endif #if defined(XP_WIN) // From the --attach-console support in nsNativeAppSupportWin.cpp, but @@ -471,11 +461,9 @@ XRE_InitChildProcess(int aArgc, // Content processes need the XPCOM/chromium frankenventloop uiLoopType = MessageLoop::TYPE_MOZILLA_CHILD; break; -#ifdef MOZ_GMP case GeckoProcessType_GMPlugin: uiLoopType = MessageLoop::TYPE_DEFAULT; break; -#endif default: uiLoopType = MessageLoop::TYPE_UI; break; @@ -537,11 +525,9 @@ XRE_InitChildProcess(int aArgc, #endif break; -#ifdef MOZ_GMP case GeckoProcessType_GMPlugin: process = new gmp::GMPProcessChild(parentPID); break; -#endif case GeckoProcessType_GPU: process = new gfx::GPUProcessImpl(parentPID); diff --git a/xpcom/build/moz.build b/xpcom/build/moz.build index 8a8649cd6c..93e89e537b 100644 --- a/xpcom/build/moz.build +++ b/xpcom/build/moz.build @@ -9,12 +9,10 @@ EXPORTS += [ 'nsXPCOMCIDInternal.h', 'nsXREAppData.h', 'nsXULAppAPI.h', + 'XREChildData.h', 'xrecore.h', ] -if CONFIG['MOZ_GMP']: - EXPORTS += ['XREChildData.h',] - EXPORTS.mozilla += [ 'FileLocation.h', 'IOInterposer.h', diff --git a/xpcom/build/nsXULAppAPI.h b/xpcom/build/nsXULAppAPI.h index 286d5c7729..56d2496b26 100644 --- a/xpcom/build/nsXULAppAPI.h +++ b/xpcom/build/nsXULAppAPI.h @@ -18,10 +18,7 @@ #include "mozilla/Assertions.h" #include "mozilla/Vector.h" #include "mozilla/TimeStamp.h" - -#ifdef MOZ_GMP #include "XREChildData.h" -#endif /** * A directory service key which provides the platform-correct "application @@ -427,24 +424,16 @@ XRE_API(const char*, XRE_API(void, XRE_SetProcessType, (const char* aProcessTypeString)) -#ifdef MOZ_GMP namespace mozilla { namespace gmp { class GMPLoader; } // namespace gmp } // namespace mozilla -#endif -#ifdef MOZ_GMP XRE_API(nsresult, XRE_InitChildProcess, (int aArgc, char* aArgv[], const XREChildData* aChildData)) -#else -XRE_API(nsresult, - XRE_InitChildProcess, (int aArgc, - char* aArgv[])) -#endif XRE_API(GeckoProcessType, XRE_GetProcessType, ())