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 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 int32 ia_role() const { return win_attributes_->ia_role; } | 714 int32 ia_role() const { return win_attributes_->ia_role; } |
715 int32 ia_state() const { return win_attributes_->ia_state; } | 715 int32 ia_state() const { return win_attributes_->ia_state; } |
716 const base::string16& role_name() const { return win_attributes_->role_name; } | 716 const base::string16& role_name() const { return win_attributes_->role_name; } |
717 int32 ia2_role() const { return win_attributes_->ia2_role; } | 717 int32 ia2_role() const { return win_attributes_->ia2_role; } |
718 int32 ia2_state() const { return win_attributes_->ia2_state; } | 718 int32 ia2_state() const { return win_attributes_->ia2_state; } |
719 const std::vector<base::string16>& ia2_attributes() const { | 719 const std::vector<base::string16>& ia2_attributes() const { |
720 return win_attributes_->ia2_attributes; | 720 return win_attributes_->ia2_attributes; |
721 } | 721 } |
722 base::string16 name() const { return win_attributes_->name; } | 722 base::string16 name() const { return win_attributes_->name; } |
723 base::string16 description() const { return win_attributes_->description; } | 723 base::string16 description() const { return win_attributes_->description; } |
724 base::string16 help() const { return win_attributes_->help; } | |
725 base::string16 value() const { return win_attributes_->value; } | 724 base::string16 value() const { return win_attributes_->value; } |
726 base::string16 hypertext() const { return win_attributes_->hypertext; } | 725 base::string16 hypertext() const { return win_attributes_->hypertext; } |
727 std::map<int32, int32>& hyperlink_offset_to_index() const { | 726 std::map<int32, int32>& hyperlink_offset_to_index() const { |
728 return win_attributes_->hyperlink_offset_to_index; | 727 return win_attributes_->hyperlink_offset_to_index; |
729 } | 728 } |
730 std::vector<int32>& hyperlinks() const { return win_attributes_->hyperlinks; } | 729 std::vector<int32>& hyperlinks() const { return win_attributes_->hyperlinks; } |
731 | 730 |
732 private: | 731 private: |
733 // Add one to the reference count and return the same object. Always | 732 // Add one to the reference count and return the same object. Always |
734 // use this method when returning a BrowserAccessibilityWin object as | 733 // use this method when returning a BrowserAccessibilityWin object as |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
851 // does not make a new reference. | 850 // does not make a new reference. |
852 BrowserAccessibilityWin* GetFromID(int32 id); | 851 BrowserAccessibilityWin* GetFromID(int32 id); |
853 | 852 |
854 // Returns true if this is a list box option with a parent of type list box, | 853 // Returns true if this is a list box option with a parent of type list box, |
855 // or a menu list option with a parent of type menu list popup. | 854 // or a menu list option with a parent of type menu list popup. |
856 bool IsListBoxOptionOrMenuListOption(); | 855 bool IsListBoxOptionOrMenuListOption(); |
857 | 856 |
858 // Updates object attributes of IA2 with html attributes. | 857 // Updates object attributes of IA2 with html attributes. |
859 void UpdateRequiredAttributes(); | 858 void UpdateRequiredAttributes(); |
860 | 859 |
| 860 // Given an int list attribute containing the ids of related elements, |
| 861 // add a new IAccessibleRelation for this object with the given type name. |
| 862 void AddRelations(ui::AXIntListAttribute src_attr, |
| 863 const base::string16& iaccessiblerelation_type); |
| 864 |
861 // Windows-specific unique ID (unique within the browser process), | 865 // Windows-specific unique ID (unique within the browser process), |
862 // used for get_accChild, NotifyWinEvent, and as the unique ID for | 866 // used for get_accChild, NotifyWinEvent, and as the unique ID for |
863 // IAccessible2 and ISimpleDOM. | 867 // IAccessible2 and ISimpleDOM. |
864 LONG unique_id_win_; | 868 LONG unique_id_win_; |
865 | 869 |
866 struct WinAttributes { | 870 struct WinAttributes { |
867 WinAttributes(); | 871 WinAttributes(); |
868 ~WinAttributes(); | 872 ~WinAttributes(); |
869 | 873 |
870 // IAccessible role and state. | 874 // IAccessible role and state. |
871 int32 ia_role; | 875 int32 ia_role; |
872 int32 ia_state; | 876 int32 ia_state; |
873 base::string16 role_name; | 877 base::string16 role_name; |
874 | 878 |
875 // IAccessible name, description, help, value. | 879 // IAccessible name, description, help, value. |
876 base::string16 name; | 880 base::string16 name; |
877 base::string16 description; | 881 base::string16 description; |
878 base::string16 help; | |
879 base::string16 value; | 882 base::string16 value; |
880 | 883 |
881 // IAccessible2 role and state. | 884 // IAccessible2 role and state. |
882 int32 ia2_role; | 885 int32 ia2_role; |
883 int32 ia2_state; | 886 int32 ia2_state; |
884 | 887 |
885 // IAccessible2 attributes. | 888 // IAccessible2 attributes. |
886 std::vector<base::string16> ia2_attributes; | 889 std::vector<base::string16> ia2_attributes; |
887 | 890 |
888 // Hypertext. | 891 // Hypertext. |
(...skipping 27 matching lines...) Expand all Loading... |
916 // Give BrowserAccessibility::Create access to our constructor. | 919 // Give BrowserAccessibility::Create access to our constructor. |
917 friend class BrowserAccessibility; | 920 friend class BrowserAccessibility; |
918 friend class BrowserAccessibilityRelation; | 921 friend class BrowserAccessibilityRelation; |
919 | 922 |
920 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); | 923 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); |
921 }; | 924 }; |
922 | 925 |
923 } // namespace content | 926 } // namespace content |
924 | 927 |
925 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 928 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
OLD | NEW |