OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
7 | 7 |
8 #include <atlbase.h> | 8 #include <atlbase.h> |
9 #include <atlcom.h> | 9 #include <atlcom.h> |
10 #include <oleacc.h> | 10 #include <oleacc.h> |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 // Mappings from roles and states to human readable strings. Initialize | 91 // Mappings from roles and states to human readable strings. Initialize |
92 // with |InitializeStringMaps|. | 92 // with |InitializeStringMaps|. |
93 static std::map<int32_t, base::string16> role_string_map; | 93 static std::map<int32_t, base::string16> role_string_map; |
94 static std::map<int32_t, base::string16> state_string_map; | 94 static std::map<int32_t, base::string16> state_string_map; |
95 | 95 |
96 CONTENT_EXPORT BrowserAccessibilityWin(); | 96 CONTENT_EXPORT BrowserAccessibilityWin(); |
97 | 97 |
98 CONTENT_EXPORT ~BrowserAccessibilityWin() override; | 98 CONTENT_EXPORT ~BrowserAccessibilityWin() override; |
99 | 99 |
100 // The Windows-specific unique ID, used as the child ID for MSAA methods | |
101 // like NotifyWinEvent, and as the unique ID for IAccessible2 and ISimpleDOM. | |
102 LONG unique_id_win() const { return unique_id_win_; } | |
103 | |
104 // Called after an atomic tree update completes. See | 100 // Called after an atomic tree update completes. See |
105 // BrowserAccessibilityManagerWin::OnAtomicUpdateFinished for more | 101 // BrowserAccessibilityManagerWin::OnAtomicUpdateFinished for more |
106 // details on what these do. | 102 // details on what these do. |
107 CONTENT_EXPORT void UpdateStep1ComputeWinAttributes(); | 103 CONTENT_EXPORT void UpdateStep1ComputeWinAttributes(); |
108 CONTENT_EXPORT void UpdateStep2ComputeHypertext(); | 104 CONTENT_EXPORT void UpdateStep2ComputeHypertext(); |
109 CONTENT_EXPORT void UpdateStep3FireEvents(bool is_subtree_creation); | 105 CONTENT_EXPORT void UpdateStep3FireEvents(bool is_subtree_creation); |
110 CONTENT_EXPORT void UpdateStep4DeleteOldWinAttributes(); | 106 CONTENT_EXPORT void UpdateStep4DeleteOldWinAttributes(); |
111 | 107 |
112 // | 108 // |
113 // BrowserAccessibility methods. | 109 // BrowserAccessibility methods. |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
860 bool IsListBoxOptionOrMenuListOption(); | 856 bool IsListBoxOptionOrMenuListOption(); |
861 | 857 |
862 // Updates object attributes of IA2 with html attributes. | 858 // Updates object attributes of IA2 with html attributes. |
863 void UpdateRequiredAttributes(); | 859 void UpdateRequiredAttributes(); |
864 | 860 |
865 // Given an int list attribute containing the ids of related elements, | 861 // Given an int list attribute containing the ids of related elements, |
866 // add a new IAccessibleRelation for this object with the given type name. | 862 // add a new IAccessibleRelation for this object with the given type name. |
867 void AddRelations(ui::AXIntListAttribute src_attr, | 863 void AddRelations(ui::AXIntListAttribute src_attr, |
868 const base::string16& iaccessiblerelation_type); | 864 const base::string16& iaccessiblerelation_type); |
869 | 865 |
870 // Windows-specific unique ID (unique within the browser process), | |
871 // used for get_accChild, NotifyWinEvent, and as the unique ID for | |
872 // IAccessible2 and ISimpleDOM. | |
873 LONG unique_id_win_; | |
874 | |
875 struct WinAttributes { | 866 struct WinAttributes { |
876 WinAttributes(); | 867 WinAttributes(); |
877 ~WinAttributes(); | 868 ~WinAttributes(); |
878 | 869 |
879 // IAccessible role and state. | 870 // IAccessible role and state. |
880 int32_t ia_role; | 871 int32_t ia_role; |
881 int32_t ia_state; | 872 int32_t ia_state; |
882 base::string16 role_name; | 873 base::string16 role_name; |
883 | 874 |
884 // IAccessible name, description, help, value. | 875 // IAccessible name, description, help, value. |
(...skipping 26 matching lines...) Expand all Loading... |
911 // IA2_EVENT_TEXT_INSERTED event. | 902 // IA2_EVENT_TEXT_INSERTED event. |
912 scoped_ptr<WinAttributes> old_win_attributes_; | 903 scoped_ptr<WinAttributes> old_win_attributes_; |
913 | 904 |
914 // Relationships between this node and other nodes. | 905 // Relationships between this node and other nodes. |
915 std::vector<BrowserAccessibilityRelation*> relations_; | 906 std::vector<BrowserAccessibilityRelation*> relations_; |
916 | 907 |
917 // The previous scroll position, so we can tell if this object scrolled. | 908 // The previous scroll position, so we can tell if this object scrolled. |
918 int previous_scroll_x_; | 909 int previous_scroll_x_; |
919 int previous_scroll_y_; | 910 int previous_scroll_y_; |
920 | 911 |
921 // The next unique id to use. | |
922 static LONG next_unique_id_win_; | |
923 | |
924 // Give BrowserAccessibility::Create access to our constructor. | 912 // Give BrowserAccessibility::Create access to our constructor. |
925 friend class BrowserAccessibility; | 913 friend class BrowserAccessibility; |
926 friend class BrowserAccessibilityRelation; | 914 friend class BrowserAccessibilityRelation; |
927 | 915 |
928 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); | 916 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); |
929 }; | 917 }; |
930 | 918 |
| 919 CONTENT_EXPORT BrowserAccessibilityWin* |
| 920 ToBrowserAccessibilityWin(BrowserAccessibility* obj); |
| 921 |
| 922 CONTENT_EXPORT const BrowserAccessibilityWin* |
| 923 ToBrowserAccessibilityWin(const BrowserAccessibility* obj); |
| 924 |
931 } // namespace content | 925 } // namespace content |
932 | 926 |
933 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 927 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
OLD | NEW |