Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(559)

Side by Side Diff: content/browser/accessibility/browser_accessibility_win.h

Issue 1435113003: Make use of new AX name calc in Chromium. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeVox and Automation API tests Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 void AddRelations(ui::AXIntListAttribute src_attr,
aboxhall 2015/11/13 23:13:49 Comment for this to be consistent with other metho
dmazzoni 2015/11/16 18:52:04 Done.
861 const base::string16& iaccessiblerelation_type);
862
861 // Windows-specific unique ID (unique within the browser process), 863 // Windows-specific unique ID (unique within the browser process),
862 // used for get_accChild, NotifyWinEvent, and as the unique ID for 864 // used for get_accChild, NotifyWinEvent, and as the unique ID for
863 // IAccessible2 and ISimpleDOM. 865 // IAccessible2 and ISimpleDOM.
864 LONG unique_id_win_; 866 LONG unique_id_win_;
865 867
866 struct WinAttributes { 868 struct WinAttributes {
867 WinAttributes(); 869 WinAttributes();
868 ~WinAttributes(); 870 ~WinAttributes();
869 871
870 // IAccessible role and state. 872 // IAccessible role and state.
871 int32 ia_role; 873 int32 ia_role;
872 int32 ia_state; 874 int32 ia_state;
873 base::string16 role_name; 875 base::string16 role_name;
874 876
875 // IAccessible name, description, help, value. 877 // IAccessible name, description, help, value.
876 base::string16 name; 878 base::string16 name;
877 base::string16 description; 879 base::string16 description;
878 base::string16 help;
879 base::string16 value; 880 base::string16 value;
880 881
881 // IAccessible2 role and state. 882 // IAccessible2 role and state.
882 int32 ia2_role; 883 int32 ia2_role;
883 int32 ia2_state; 884 int32 ia2_state;
884 885
885 // IAccessible2 attributes. 886 // IAccessible2 attributes.
886 std::vector<base::string16> ia2_attributes; 887 std::vector<base::string16> ia2_attributes;
887 888
888 // Hypertext. 889 // Hypertext.
(...skipping 27 matching lines...) Expand all
916 // Give BrowserAccessibility::Create access to our constructor. 917 // Give BrowserAccessibility::Create access to our constructor.
917 friend class BrowserAccessibility; 918 friend class BrowserAccessibility;
918 friend class BrowserAccessibilityRelation; 919 friend class BrowserAccessibilityRelation;
919 920
920 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); 921 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin);
921 }; 922 };
922 923
923 } // namespace content 924 } // namespace content
924 925
925 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ 926 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698