From 8c41fcd24048154e3526e506157d337a2ab434e8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Thu, 6 Feb 2020 16:03:39 -0500 Subject: Issue #1390 - Get rid of the Presentation API --- dom/ipc/ContentChild.cpp | 45 --------------------------------------------- dom/ipc/ContentChild.h | 11 ----------- dom/ipc/ContentParent.cpp | 23 ----------------------- dom/ipc/ContentParent.h | 6 ------ dom/ipc/PContent.ipdl | 16 ---------------- 5 files changed, 101 deletions(-) (limited to 'dom/ipc') diff --git a/dom/ipc/ContentChild.cpp b/dom/ipc/ContentChild.cpp index fdf0fcf3e..41856eef8 100644 --- a/dom/ipc/ContentChild.cpp +++ b/dom/ipc/ContentChild.cpp @@ -150,8 +150,6 @@ #endif #include "mozilla/dom/File.h" -#include "mozilla/dom/PPresentationChild.h" -#include "mozilla/dom/PresentationIPCService.h" #include "mozilla/ipc/InputStreamUtils.h" #ifdef MOZ_WEBSPEECH @@ -1417,20 +1415,6 @@ ContentChild::SendPBlobConstructor(PBlobChild* aActor, return PContentChild::SendPBlobConstructor(aActor, aParams); } -PPresentationChild* -ContentChild::AllocPPresentationChild() -{ - MOZ_CRASH("We should never be manually allocating PPresentationChild actors"); - return nullptr; -} - -bool -ContentChild::DeallocPPresentationChild(PPresentationChild* aActor) -{ - delete aActor; - return true; -} - PFlyWebPublishedServerChild* ContentChild::AllocPFlyWebPublishedServerChild(const nsString& name, const FlyWebPublishOptions& params) @@ -1447,35 +1431,6 @@ ContentChild::DeallocPFlyWebPublishedServerChild(PFlyWebPublishedServerChild* aA return true; } -bool -ContentChild::RecvNotifyPresentationReceiverLaunched(PBrowserChild* aIframe, - const nsString& aSessionId) -{ - nsCOMPtr docShell = - do_GetInterface(static_cast(aIframe)->WebNavigation()); - NS_WARNING_ASSERTION(docShell, "WebNavigation failed"); - - nsCOMPtr service = - do_GetService(PRESENTATION_SERVICE_CONTRACTID); - NS_WARNING_ASSERTION(service, "presentation service is missing"); - - Unused << NS_WARN_IF(NS_FAILED(static_cast(service.get())->MonitorResponderLoading(aSessionId, docShell))); - - return true; -} - -bool -ContentChild::RecvNotifyPresentationReceiverCleanUp(const nsString& aSessionId) -{ - nsCOMPtr service = - do_GetService(PRESENTATION_SERVICE_CONTRACTID); - NS_WARNING_ASSERTION(service, "presentation service is missing"); - - Unused << NS_WARN_IF(NS_FAILED(service->UntrackSessionInfo(aSessionId, nsIPresentationService::ROLE_RECEIVER))); - - return true; -} - bool ContentChild::RecvNotifyEmptyHTTPCache() { diff --git a/dom/ipc/ContentChild.h b/dom/ipc/ContentChild.h index 4c8f15cc0..403328a21 100644 --- a/dom/ipc/ContentChild.h +++ b/dom/ipc/ContentChild.h @@ -297,23 +297,12 @@ public: virtual bool DeallocPStorageChild(PStorageChild* aActor) override; - virtual PPresentationChild* AllocPPresentationChild() override; - - virtual bool DeallocPPresentationChild(PPresentationChild* aActor) override; - virtual PFlyWebPublishedServerChild* AllocPFlyWebPublishedServerChild(const nsString& name, const FlyWebPublishOptions& params) override; virtual bool DeallocPFlyWebPublishedServerChild(PFlyWebPublishedServerChild* aActor) override; - virtual bool - RecvNotifyPresentationReceiverLaunched(PBrowserChild* aIframe, - const nsString& aSessionId) override; - - virtual bool - RecvNotifyPresentationReceiverCleanUp(const nsString& aSessionId) override; - virtual bool RecvNotifyEmptyHTTPCache() override; virtual PSpeechSynthesisChild* AllocPSpeechSynthesisChild() override; diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 97e3a4880..026346b77 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -51,8 +51,6 @@ #include "mozilla/dom/ServiceWorkerRegistrar.h" #include "mozilla/dom/power/PowerManagerService.h" #include "mozilla/dom/Permissions.h" -#include "mozilla/dom/PresentationParent.h" -#include "mozilla/dom/PPresentationParent.h" #include "mozilla/dom/PushNotifier.h" #include "mozilla/dom/FlyWebPublishedServerIPC.h" #include "mozilla/dom/quota/QuotaManagerService.h" @@ -3106,27 +3104,6 @@ ContentParent::DeallocPStorageParent(PStorageParent* aActor) return true; } -PPresentationParent* -ContentParent::AllocPPresentationParent() -{ - RefPtr actor = new PresentationParent(); - return actor.forget().take(); -} - -bool -ContentParent::DeallocPPresentationParent(PPresentationParent* aActor) -{ - RefPtr actor = - dont_AddRef(static_cast(aActor)); - return true; -} - -bool -ContentParent::RecvPPresentationConstructor(PPresentationParent* aActor) -{ - return static_cast(aActor)->Init(mChildID); -} - PFlyWebPublishedServerParent* ContentParent::AllocPFlyWebPublishedServerParent(const nsString& name, const FlyWebPublishOptions& params) diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 26b5c44ac..a4ddb9c64 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -800,12 +800,6 @@ private: virtual bool DeallocPStorageParent(PStorageParent* aActor) override; - virtual PPresentationParent* AllocPPresentationParent() override; - - virtual bool DeallocPPresentationParent(PPresentationParent* aActor) override; - - virtual bool RecvPPresentationConstructor(PPresentationParent* aActor) override; - virtual PFlyWebPublishedServerParent* AllocPFlyWebPublishedServerParent(const nsString& name, const FlyWebPublishOptions& params) override; diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index e8fb25aec..9ed8363d7 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -43,7 +43,6 @@ include protocol PJavaScript; include protocol PRemoteSpellcheckEngine; include protocol PWebBrowserPersistDocument; include protocol PWebrtcGlobal; -include protocol PPresentation; include protocol PVideoDecoderManager; include protocol PFlyWebPublishedServer; include DOMTypes; @@ -260,7 +259,6 @@ nested(upto inside_cpow) sync protocol PContent manages PRemoteSpellcheckEngine; manages PWebBrowserPersistDocument; manages PWebrtcGlobal; - manages PPresentation; manages PFlyWebPublishedServer; both: @@ -480,18 +478,6 @@ child: */ async UpdateWindow(uintptr_t aChildId); - /** - * Notify the child that presentation receiver has been launched with the - * correspondent iframe. - */ - async NotifyPresentationReceiverLaunched(PBrowser aIframe, nsString aSessionId); - - /** - * Notify the child that the info about a presentation receiver needs to be - * cleaned up. - */ - async NotifyPresentationReceiverCleanUp(nsString aSessionId); - /** * Notify the child that cache is emptied. */ @@ -682,8 +668,6 @@ parent: async PWebrtcGlobal(); - async PPresentation(); - async PFlyWebPublishedServer(nsString name, FlyWebPublishOptions params); // Services remoting -- cgit v1.2.3