Tue, 06 Jan 2015 21:39:09 +0100
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 | /* vim: set ts=2 et sw=2 tw=80: */ |
michael@0 | 3 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #ifndef mozilla_a11y_ia2Accessible_h_ |
michael@0 | 8 | #define mozilla_a11y_ia2Accessible_h_ |
michael@0 | 9 | |
michael@0 | 10 | #include "nsISupports.h" |
michael@0 | 11 | |
michael@0 | 12 | #include "Accessible2_2.h" |
michael@0 | 13 | |
michael@0 | 14 | namespace mozilla { |
michael@0 | 15 | namespace a11y { |
michael@0 | 16 | |
michael@0 | 17 | class ia2Accessible : public IAccessible2_2 |
michael@0 | 18 | { |
michael@0 | 19 | public: |
michael@0 | 20 | |
michael@0 | 21 | // IUnknown |
michael@0 | 22 | STDMETHODIMP QueryInterface(REFIID, void**); |
michael@0 | 23 | |
michael@0 | 24 | // IAccessible2 |
michael@0 | 25 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nRelations( |
michael@0 | 26 | /* [retval][out] */ long* nRelations); |
michael@0 | 27 | |
michael@0 | 28 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relation( |
michael@0 | 29 | /* [in] */ long relationIndex, |
michael@0 | 30 | /* [retval][out] */ IAccessibleRelation** relation); |
michael@0 | 31 | |
michael@0 | 32 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relations( |
michael@0 | 33 | /* [in] */ long maxRelations, |
michael@0 | 34 | /* [length_is][size_is][out] */ IAccessibleRelation** relation, |
michael@0 | 35 | /* [retval][out] */ long* nRelations); |
michael@0 | 36 | |
michael@0 | 37 | virtual HRESULT STDMETHODCALLTYPE role( |
michael@0 | 38 | /* [retval][out] */ long* role); |
michael@0 | 39 | |
michael@0 | 40 | virtual HRESULT STDMETHODCALLTYPE scrollTo( |
michael@0 | 41 | /* [in] */ enum IA2ScrollType scrollType); |
michael@0 | 42 | |
michael@0 | 43 | virtual HRESULT STDMETHODCALLTYPE scrollToPoint( |
michael@0 | 44 | /* [in] */ enum IA2CoordinateType coordinateType, |
michael@0 | 45 | /* [in] */ long x, |
michael@0 | 46 | /* [in] */ long y); |
michael@0 | 47 | |
michael@0 | 48 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_groupPosition( |
michael@0 | 49 | /* [out] */ long* groupLevel, |
michael@0 | 50 | /* [out] */ long* similarItemsInGroup, |
michael@0 | 51 | /* [retval][out] */ long* positionInGroup); |
michael@0 | 52 | |
michael@0 | 53 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_states( |
michael@0 | 54 | /* [retval][out] */ AccessibleStates* states); |
michael@0 | 55 | |
michael@0 | 56 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extendedRole( |
michael@0 | 57 | /* [retval][out] */ BSTR* extendedRole); |
michael@0 | 58 | |
michael@0 | 59 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedExtendedRole( |
michael@0 | 60 | /* [retval][out] */ BSTR* localizedExtendedRole); |
michael@0 | 61 | |
michael@0 | 62 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_nExtendedStates( |
michael@0 | 63 | /* [retval][out] */ long* nExtendedStates); |
michael@0 | 64 | |
michael@0 | 65 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_extendedStates( |
michael@0 | 66 | /* [in] */ long maxExtendedStates, |
michael@0 | 67 | /* [length_is][length_is][size_is][size_is][out] */ BSTR** extendedStates, |
michael@0 | 68 | /* [retval][out] */ long* nExtendedStates); |
michael@0 | 69 | |
michael@0 | 70 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_localizedExtendedStates( |
michael@0 | 71 | /* [in] */ long maxLocalizedExtendedStates, |
michael@0 | 72 | /* [length_is][length_is][size_is][size_is][out] */ BSTR** localizedExtendedStates, |
michael@0 | 73 | /* [retval][out] */ long* nLocalizedExtendedStates); |
michael@0 | 74 | |
michael@0 | 75 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_uniqueID( |
michael@0 | 76 | /* [retval][out] */ long* uniqueID); |
michael@0 | 77 | |
michael@0 | 78 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_windowHandle( |
michael@0 | 79 | /* [retval][out] */ HWND* windowHandle); |
michael@0 | 80 | |
michael@0 | 81 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_indexInParent( |
michael@0 | 82 | /* [retval][out] */ long* indexInParent); |
michael@0 | 83 | |
michael@0 | 84 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_locale( |
michael@0 | 85 | /* [retval][out] */ IA2Locale* locale); |
michael@0 | 86 | |
michael@0 | 87 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attributes( |
michael@0 | 88 | /* [retval][out] */ BSTR* attributes); |
michael@0 | 89 | |
michael@0 | 90 | // IAccessible2_2 |
michael@0 | 91 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_attribute( |
michael@0 | 92 | /* [in] */ BSTR name, |
michael@0 | 93 | /* [out, retval] */ VARIANT* attribute); |
michael@0 | 94 | |
michael@0 | 95 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_accessibleWithCaret( |
michael@0 | 96 | /* [out] */ IUnknown** accessible, |
michael@0 | 97 | /* [out, retval] */ long* caretOffset); |
michael@0 | 98 | |
michael@0 | 99 | virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_relationTargetsOfType( |
michael@0 | 100 | /* [in] */ BSTR type, |
michael@0 | 101 | /* [in] */ long maxTargets, |
michael@0 | 102 | /* [out, size_is(,*nTargets)] */ IUnknown*** targets, |
michael@0 | 103 | /* [out, retval] */ long* nTargets |
michael@0 | 104 | ); |
michael@0 | 105 | |
michael@0 | 106 | // Helper method |
michael@0 | 107 | static HRESULT ConvertToIA2Attributes(nsIPersistentProperties* aAttributes, |
michael@0 | 108 | BSTR* aIA2Attributes); |
michael@0 | 109 | }; |
michael@0 | 110 | |
michael@0 | 111 | } // namespace a11y |
michael@0 | 112 | } // namespace mozilla |
michael@0 | 113 | |
michael@0 | 114 | #endif |