accessible/src/xul/XULTabAccessible.h

Tue, 06 Jan 2015 21:39:09 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 06 Jan 2015 21:39:09 +0100
branch
TOR_BUG_9701
changeset 8
97036ab72558
permissions
-rw-r--r--

Conditionally force memory storage according to privacy.thirdparty.isolate;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.

michael@0 1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #ifndef mozilla_a11y_XULTabAccessible_h__
michael@0 7 #define mozilla_a11y_XULTabAccessible_h__
michael@0 8
michael@0 9 // NOTE: alphabetically ordered
michael@0 10 #include "XULMenuAccessible.h"
michael@0 11 #include "XULSelectControlAccessible.h"
michael@0 12
michael@0 13 namespace mozilla {
michael@0 14 namespace a11y {
michael@0 15
michael@0 16 /**
michael@0 17 * An individual tab, xul:tab element.
michael@0 18 */
michael@0 19 class XULTabAccessible : public AccessibleWrap
michael@0 20 {
michael@0 21 public:
michael@0 22 enum { eAction_Switch = 0 };
michael@0 23
michael@0 24 XULTabAccessible(nsIContent* aContent, DocAccessible* aDoc);
michael@0 25
michael@0 26 // nsIAccessible
michael@0 27 NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
michael@0 28 NS_IMETHOD DoAction(uint8_t index);
michael@0 29
michael@0 30 // Accessible
michael@0 31 virtual a11y::role NativeRole();
michael@0 32 virtual uint64_t NativeState();
michael@0 33 virtual uint64_t NativeInteractiveState() const;
michael@0 34 virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
michael@0 35
michael@0 36 // ActionAccessible
michael@0 37 virtual uint8_t ActionCount();
michael@0 38 };
michael@0 39
michael@0 40
michael@0 41 /**
michael@0 42 * A container of tab objects, xul:tabs element.
michael@0 43 */
michael@0 44 class XULTabsAccessible : public XULSelectControlAccessible
michael@0 45 {
michael@0 46 public:
michael@0 47 XULTabsAccessible(nsIContent* aContent, DocAccessible* aDoc);
michael@0 48
michael@0 49 // Accessible
michael@0 50 virtual void Value(nsString& aValue);
michael@0 51 virtual a11y::role NativeRole();
michael@0 52
michael@0 53 // ActionAccessible
michael@0 54 virtual uint8_t ActionCount();
michael@0 55
michael@0 56 protected:
michael@0 57 // Accessible
michael@0 58 virtual ENameValueFlag NativeName(nsString& aName) MOZ_OVERRIDE;
michael@0 59 };
michael@0 60
michael@0 61
michael@0 62 /**
michael@0 63 * A container of tab panels, xul:tabpanels element.
michael@0 64 */
michael@0 65 class XULTabpanelsAccessible : public AccessibleWrap
michael@0 66 {
michael@0 67 public:
michael@0 68 XULTabpanelsAccessible(nsIContent* aContent, DocAccessible* aDoc) :
michael@0 69 AccessibleWrap(aContent, aDoc)
michael@0 70 { mType = eXULTabpanelsType; }
michael@0 71
michael@0 72 // Accessible
michael@0 73 virtual a11y::role NativeRole();
michael@0 74 };
michael@0 75
michael@0 76
michael@0 77 /**
michael@0 78 * A tabpanel object, child elements of xul:tabpanels element.
michael@0 79 *
michael@0 80 * XXX: we need to move the class logic into generic class since
michael@0 81 * for example we do not create instance of this class for XUL textbox used as
michael@0 82 * a tabpanel.
michael@0 83 */
michael@0 84 class XULTabpanelAccessible : public AccessibleWrap
michael@0 85 {
michael@0 86 public:
michael@0 87 XULTabpanelAccessible(nsIContent* aContent, DocAccessible* aDoc);
michael@0 88
michael@0 89 // Accessible
michael@0 90 virtual a11y::role NativeRole();
michael@0 91 virtual Relation RelationByType(RelationType aType) MOZ_OVERRIDE;
michael@0 92 };
michael@0 93
michael@0 94 } // namespace a11y
michael@0 95 } // namespace mozilla
michael@0 96
michael@0 97 #endif
michael@0 98

mercurial