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

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

Issue 13770015: Rename confusing child_id to unique_id_win (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed feedback Created 7 years, 8 months 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 // Mappings from roles and states to human readable strings. Initialize 85 // Mappings from roles and states to human readable strings. Initialize
86 // with |InitializeStringMaps|. 86 // with |InitializeStringMaps|.
87 static std::map<int32, string16> role_string_map; 87 static std::map<int32, string16> role_string_map;
88 static std::map<int32, string16> state_string_map; 88 static std::map<int32, string16> state_string_map;
89 89
90 CONTENT_EXPORT BrowserAccessibilityWin(); 90 CONTENT_EXPORT BrowserAccessibilityWin();
91 91
92 CONTENT_EXPORT virtual ~BrowserAccessibilityWin(); 92 CONTENT_EXPORT virtual ~BrowserAccessibilityWin();
93 93
94 // The Windows-specific unique ID, used as the child ID for MSAA methods
95 // like NotifyWinEvent, and as the unique ID for IAccessible2 and ISimpleDOM.
96 LONG unique_id_win() const { return unique_id_win_; }
97
94 // 98 //
95 // BrowserAccessibility methods. 99 // BrowserAccessibility methods.
96 // 100 //
97 CONTENT_EXPORT virtual void PreInitialize() OVERRIDE; 101 CONTENT_EXPORT virtual void PreInitialize() OVERRIDE;
98 CONTENT_EXPORT virtual void PostInitialize() OVERRIDE; 102 CONTENT_EXPORT virtual void PostInitialize() OVERRIDE;
99 CONTENT_EXPORT virtual void NativeAddReference() OVERRIDE; 103 CONTENT_EXPORT virtual void NativeAddReference() OVERRIDE;
100 CONTENT_EXPORT virtual void NativeReleaseReference() OVERRIDE; 104 CONTENT_EXPORT virtual void NativeReleaseReference() OVERRIDE;
101 CONTENT_EXPORT virtual bool IsNative() const OVERRIDE; 105 CONTENT_EXPORT virtual bool IsNative() const OVERRIDE;
102 106
103 // 107 //
(...skipping 709 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 // return the offset of that boundary. 817 // return the offset of that boundary.
814 LONG FindBoundary(const string16& text, 818 LONG FindBoundary(const string16& text,
815 IA2TextBoundaryType ia2_boundary, 819 IA2TextBoundaryType ia2_boundary,
816 LONG start_offset, 820 LONG start_offset,
817 ui::TextBoundaryDirection direction); 821 ui::TextBoundaryDirection direction);
818 822
819 // Return a pointer to the object corresponding to the given renderer_id, 823 // Return a pointer to the object corresponding to the given renderer_id,
820 // does not make a new reference. 824 // does not make a new reference.
821 BrowserAccessibilityWin* GetFromRendererID(int32 renderer_id); 825 BrowserAccessibilityWin* GetFromRendererID(int32 renderer_id);
822 826
827 // Windows-specific unique ID (unique within the browser process),
828 // used for get_accChild, NotifyWinEvent, and as the unique ID for
829 // IAccessible2 and ISimpleDOM.
830 LONG unique_id_win_;
831
823 // IAccessible role and state. 832 // IAccessible role and state.
824 int32 ia_role_; 833 int32 ia_role_;
825 int32 ia_state_; 834 int32 ia_state_;
826 835
827 // IAccessible2 role and state. 836 // IAccessible2 role and state.
828 int32 ia2_role_; 837 int32 ia2_role_;
829 int32 ia2_state_; 838 int32 ia2_state_;
830 839
831 // IAccessible2 attributes. 840 // IAccessible2 attributes.
832 std::vector<string16> ia2_attributes_; 841 std::vector<string16> ia2_attributes_;
(...skipping 20 matching lines...) Expand all
853 string16 hypertext_; 862 string16 hypertext_;
854 863
855 // Maps the |hypertext_| embedded character offset to an index in 864 // Maps the |hypertext_| embedded character offset to an index in
856 // |hyperlinks_|. 865 // |hyperlinks_|.
857 std::map<int32, int32> hyperlink_offset_to_index_; 866 std::map<int32, int32> hyperlink_offset_to_index_;
858 867
859 // Collection of non-static text child indicies, each of which corresponds to 868 // Collection of non-static text child indicies, each of which corresponds to
860 // a hyperlink. 869 // a hyperlink.
861 std::vector<int32> hyperlinks_; 870 std::vector<int32> hyperlinks_;
862 871
872 // The next unique id to use.
873 static LONG next_unique_id_win_;
874
863 // Give BrowserAccessibility::Create access to our constructor. 875 // Give BrowserAccessibility::Create access to our constructor.
864 friend class BrowserAccessibility; 876 friend class BrowserAccessibility;
865 friend class BrowserAccessibilityRelation; 877 friend class BrowserAccessibilityRelation;
866 878
867 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); 879 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin);
868 }; 880 };
869 881
870 } // namespace content 882 } // namespace content
871 883
872 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ 884 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698