diff --git a/accessible/interfaces/nsIAccessibilityService.idl b/accessible/interfaces/nsIAccessibilityService.idl index ff145c877e37..87a77f7e52d1 100644 --- a/accessible/interfaces/nsIAccessibilityService.idl +++ b/accessible/interfaces/nsIAccessibilityService.idl @@ -78,6 +78,15 @@ interface nsIAccessibilityService : nsISupports */ nsIAccessible getAccessibleFromCache(in Node aNode); + /** + * Set the active cache domains. If any given domains are not currently + * active, then the accessibility service will enable them in all content + * processes, causing them to be cached. + * + * @param aCacheDomains [in] the cache domains to set + */ + void setCacheDomains(in unsigned long long aCacheDomains); + /** * Create a new pivot for tracking a position and traversing a subtree. * diff --git a/accessible/xpcom/xpcAccessibilityService.cpp b/accessible/xpcom/xpcAccessibilityService.cpp index f6692bffbb02..c6fd0c15d293 100644 --- a/accessible/xpcom/xpcAccessibilityService.cpp +++ b/accessible/xpcom/xpcAccessibilityService.cpp @@ -229,6 +229,17 @@ xpcAccessibilityService::GetAccessibleFromCache(nsINode* aNode, return NS_OK; } +NS_IMETHODIMP +xpcAccessibilityService::SetCacheDomains(uint64_t aCacheDomains) { + nsAccessibilityService* accService = GetAccService(); + if (!accService) { + return NS_ERROR_SERVICE_NOT_AVAILABLE; + } + + accService->SetCacheDomains(aCacheDomains); + return NS_OK; +} + NS_IMETHODIMP xpcAccessibilityService::CreateAccessiblePivot(nsIAccessible* aRoot, nsIAccessiblePivot** aPivot) {