diff --git a/dom/ipc/ContentParent.cpp b/dom/ipc/ContentParent.cpp index 9bba64a1c62b..7bc85544bd35 100644 --- a/dom/ipc/ContentParent.cpp +++ b/dom/ipc/ContentParent.cpp @@ -34,6 +34,9 @@ #include "IHistory.h" #include "imgIContainer.h" #include "mozIApplication.h" +#if defined(XP_WIN) && defined(ACCESSIBILITY) +#include "mozilla/a11y/AccessibleWrap.h" +#endif #include "mozilla/ClearOnShutdown.h" #include "mozilla/StyleSheetInlines.h" #include "mozilla/DataStorage.h" @@ -1954,6 +1957,10 @@ ContentParent::ActorDestroy(ActorDestroyReason why) } mBlobURLs.Clear(); + +#if defined(XP_WIN32) && defined(ACCESSIBILITY) + a11y::AccessibleWrap::ReleaseContentProcessIdFor(ChildID()); +#endif } void @@ -5348,6 +5355,18 @@ ContentParent::RecvUnstoreAndBroadcastBlobURLUnregistration(const nsCString& aUR return true; } +bool +ContentParent::RecvGetA11yContentId(uint32_t* aContentId) +{ +#if defined(XP_WIN32) && defined(ACCESSIBILITY) + *aContentId = a11y::AccessibleWrap::GetContentProcessIdFor(ChildID()); + MOZ_ASSERT(*aContentId); + return true; +#else + return false; +#endif +} + } // namespace dom } // namespace mozilla diff --git a/dom/ipc/ContentParent.h b/dom/ipc/ContentParent.h index 924fe3804652..b7fe9809ce39 100644 --- a/dom/ipc/ContentParent.h +++ b/dom/ipc/ContentParent.h @@ -565,6 +565,9 @@ public: virtual bool RecvUnstoreAndBroadcastBlobURLUnregistration(const nsCString& aURI) override; + virtual bool + RecvGetA11yContentId(uint32_t* aContentId) override; + virtual int32_t Pid() const override; // Use the PHangMonitor channel to ask the child to repaint a tab. diff --git a/dom/ipc/PContent.ipdl b/dom/ipc/PContent.ipdl index fc7472e31b51..e8632281eefc 100644 --- a/dom/ipc/PContent.ipdl +++ b/dom/ipc/PContent.ipdl @@ -1236,6 +1236,8 @@ parent: async AccumulateChildHistogram(Accumulation[] accumulations); async AccumulateChildKeyedHistogram(KeyedAccumulation[] accumulations); + sync GetA11yContentId() returns (uint32_t aContentId); + both: async AsyncMessage(nsString aMessage, CpowEntry[] aCpows, Principal aPrincipal, ClonedMessageData aData);