michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_a11y_HTMLLinkAccessible_h__ michael@0: #define mozilla_a11y_HTMLLinkAccessible_h__ michael@0: michael@0: #include "HyperTextAccessibleWrap.h" michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: class HTMLLinkAccessible : public HyperTextAccessibleWrap michael@0: { michael@0: public: michael@0: HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc); michael@0: michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: // nsIAccessible michael@0: NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName); michael@0: NS_IMETHOD DoAction(uint8_t aIndex); michael@0: michael@0: // Accessible michael@0: virtual void Value(nsString& aValue); michael@0: virtual a11y::role NativeRole(); michael@0: virtual uint64_t NativeState(); michael@0: virtual uint64_t NativeLinkState() const; michael@0: virtual uint64_t NativeInteractiveState() const; michael@0: michael@0: // ActionAccessible michael@0: virtual uint8_t ActionCount(); michael@0: michael@0: // HyperLinkAccessible michael@0: virtual bool IsLink(); michael@0: virtual already_AddRefed AnchorURIAt(uint32_t aAnchorIndex); michael@0: michael@0: protected: michael@0: enum { eAction_Jump = 0 }; michael@0: michael@0: /** michael@0: * Returns true if the link has href attribute. michael@0: */ michael@0: bool IsLinked(); michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif