/* This Source Code Form is subject to the terms of the Mozilla Public * 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/. */
class LocalAccessible; class DocAccessible; class xpcAccessibleDocument; class DocAccessibleParent;
/** * Manage the document accessible life cycle.
*/ class DocManager : public nsIWebProgressListener, public nsIDOMEventListener, public nsSupportsWeakReference { public:
NS_DECL_THREADSAFE_ISUPPORTS
NS_DECL_NSIWEBPROGRESSLISTENER
NS_DECL_NSIDOMEVENTLISTENER
/** * Return document accessible for the given DOM node.
*/
DocAccessible* GetDocAccessible(dom::Document* aDocument);
/** * Return document accessible for the given presshell.
*/
DocAccessible* GetDocAccessible(const PresShell* aPresShell);
/** * Search through all document accessibles for an accessible with the given * unique id.
*/
LocalAccessible* FindAccessibleInCache(nsINode* aNode) const;
/** * Called by document accessible when it gets shutdown. * @param aAllowServiceShutdown true to shut down nsAccessibilityService * if it is no longer required, false to prevent it.
*/ void NotifyOfDocumentShutdown(DocAccessible* aDocument,
dom::Document* aDOMDocument, bool aAllowServiceShutdown = true);
/* * Notification that a top level document in a content process has gone away.
*/ staticvoid RemoteDocShutdown(DocAccessibleParent* aDoc) {
DebugOnly<bool> result = sRemoteDocuments->RemoveElement(aDoc);
MOZ_ASSERT(result, "Why didn't we find the document!");
}
/* * Notify of a new top level document in a content process.
*/ staticvoid RemoteDocAdded(DocAccessibleParent* aDoc);
private: /** * Create an accessible document if it was't created and fire accessibility * events if needed. * * @param aDocument [in] loaded DOM document * @param aLoadEventType [in] specifies the event type to fire load event, * if 0 then no event is fired
*/ void HandleDOMDocumentLoad(dom::Document* aDocument, uint32_t aLoadEventType);
/* * The list of remote top level documents.
*/ static StaticAutoPtr<nsTArray<DocAccessibleParent*>> sRemoteDocuments;
};
/** * Return the existing document accessible for the document if any. * Note this returns the doc accessible for the primary pres shell if there is * more than one.
*/
DocAccessible* GetExistingDocAccessible(const dom::Document* aDocument);
} // namespace a11y
} // namespace mozilla
#endif// mozilla_a11_DocManager_h_
¤ Dauer der Verarbeitung: 0.29 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.