| OLD | NEW |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2017 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_COM_WIN_H_ | 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_ |
| 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_ | 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 711 | 711 |
| 712 // Computes and caches the IA2 text style attributes for the text and other | 712 // Computes and caches the IA2 text style attributes for the text and other |
| 713 // embedded child objects. | 713 // embedded child objects. |
| 714 CONTENT_EXPORT void ComputeStylesIfNeeded(); | 714 CONTENT_EXPORT void ComputeStylesIfNeeded(); |
| 715 | 715 |
| 716 // |offset| could either be a text character or a child index in case of | 716 // |offset| could either be a text character or a child index in case of |
| 717 // non-text objects. | 717 // non-text objects. |
| 718 AXPlatformPosition::AXPositionInstance CreatePositionForSelectionAt( | 718 AXPlatformPosition::AXPositionInstance CreatePositionForSelectionAt( |
| 719 int offset) const; | 719 int offset) const; |
| 720 | 720 |
| 721 // Accessors. | 721 // Public accessors (these do not have COM accessible accessors) |
| 722 const base::string16& role_name() const { return win_attributes_->role_name; } |
| 723 const std::map<int, std::vector<base::string16>>& offset_to_text_attributes() |
| 724 const { |
| 725 return win_attributes_->offset_to_text_attributes; |
| 726 } |
| 727 |
| 728 private: |
| 729 // Private accessors. |
| 722 int32_t ia_role() const { return win_attributes_->ia_role; } | 730 int32_t ia_role() const { return win_attributes_->ia_role; } |
| 723 int32_t ia_state() const { return win_attributes_->ia_state; } | 731 int32_t ia_state() const { return win_attributes_->ia_state; } |
| 724 const base::string16& role_name() const { return win_attributes_->role_name; } | |
| 725 int32_t ia2_role() const { return win_attributes_->ia2_role; } | 732 int32_t ia2_role() const { return win_attributes_->ia2_role; } |
| 726 int32_t ia2_state() const { return win_attributes_->ia2_state; } | 733 int32_t ia2_state() const { return win_attributes_->ia2_state; } |
| 727 const std::vector<base::string16>& ia2_attributes() const { | 734 const std::vector<base::string16>& ia2_attributes() const { |
| 728 return win_attributes_->ia2_attributes; | 735 return win_attributes_->ia2_attributes; |
| 729 } | 736 } |
| 730 base::string16 name() const { return win_attributes_->name; } | 737 base::string16 name() const { return win_attributes_->name; } |
| 731 base::string16 description() const { return win_attributes_->description; } | 738 base::string16 description() const { return win_attributes_->description; } |
| 732 base::string16 value() const { return win_attributes_->value; } | 739 base::string16 value() const { return win_attributes_->value; } |
| 733 const std::map<int, std::vector<base::string16>>& offset_to_text_attributes() | 740 |
| 734 const { | |
| 735 return win_attributes_->offset_to_text_attributes; | |
| 736 } | |
| 737 std::map<int32_t, int32_t>& hyperlink_offset_to_index() const { | 741 std::map<int32_t, int32_t>& hyperlink_offset_to_index() const { |
| 738 return win_attributes_->hyperlink_offset_to_index; | 742 return win_attributes_->hyperlink_offset_to_index; |
| 739 } | 743 } |
| 740 std::vector<int32_t>& hyperlinks() const { | 744 std::vector<int32_t>& hyperlinks() const { |
| 741 return win_attributes_->hyperlinks; | 745 return win_attributes_->hyperlinks; |
| 742 } | 746 } |
| 743 | 747 |
| 744 private: | |
| 745 // Setter and getter for the browser accessibility owner | 748 // Setter and getter for the browser accessibility owner |
| 746 BrowserAccessibilityWin* owner() const { return owner_; } | 749 BrowserAccessibilityWin* owner() const { return owner_; } |
| 747 void SetOwner(BrowserAccessibilityWin* owner) { owner_ = owner; } | 750 void SetOwner(BrowserAccessibilityWin* owner) { owner_ = owner; } |
| 748 | 751 |
| 749 BrowserAccessibilityManager* Manager() const; | 752 BrowserAccessibilityManager* Manager() const; |
| 750 | 753 |
| 751 // | 754 // |
| 752 // AXPlatformNode overrides | 755 // AXPlatformNode overrides |
| 753 // | 756 // |
| 754 void Destroy() override; | 757 void Destroy() override; |
| (...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 984 | 987 |
| 985 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityComWin); | 988 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityComWin); |
| 986 }; | 989 }; |
| 987 | 990 |
| 988 CONTENT_EXPORT BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( | 991 CONTENT_EXPORT BrowserAccessibilityComWin* ToBrowserAccessibilityComWin( |
| 989 BrowserAccessibility* obj); | 992 BrowserAccessibility* obj); |
| 990 | 993 |
| 991 } // namespace content | 994 } // namespace content |
| 992 | 995 |
| 993 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_ | 996 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_COM_WIN_H_ |
| OLD | NEW |