| 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 // bitmasks defined in ui::AXNodeData. | 744 // bitmasks defined in ui::AXNodeData. |
| 745 void InitRoleAndState(); | 745 void InitRoleAndState(); |
| 746 | 746 |
| 747 // Retrieve the value of an attribute from the string attribute map and | 747 // Retrieve the value of an attribute from the string attribute map and |
| 748 // if found and nonempty, allocate a new BSTR (with SysAllocString) | 748 // if found and nonempty, allocate a new BSTR (with SysAllocString) |
| 749 // and return S_OK. If not found or empty, return S_FALSE. | 749 // and return S_OK. If not found or empty, return S_FALSE. |
| 750 HRESULT GetStringAttributeAsBstr( | 750 HRESULT GetStringAttributeAsBstr( |
| 751 ui::AXStringAttribute attribute, | 751 ui::AXStringAttribute attribute, |
| 752 BSTR* value_bstr); | 752 BSTR* value_bstr); |
| 753 | 753 |
| 754 // Escapes the following characters with backslash: backslash, colon, comma, |
| 755 // equals and semicolon. |
| 756 // It's okay for input to be the same as output. |
| 757 static void SanitizeStringAttributeForIA2(const base::string16& input, |
| 758 base::string16* output); |
| 759 |
| 754 // If the string attribute |attribute| is present, add its value as an | 760 // If the string attribute |attribute| is present, add its value as an |
| 755 // IAccessible2 attribute with the name |ia2_attr|. | 761 // IAccessible2 attribute with the name |ia2_attr|. |
| 756 void StringAttributeToIA2(ui::AXStringAttribute attribute, | 762 void StringAttributeToIA2(ui::AXStringAttribute attribute, |
| 757 const char* ia2_attr); | 763 const char* ia2_attr); |
| 758 | 764 |
| 759 // If the bool attribute |attribute| is present, add its value as an | 765 // If the bool attribute |attribute| is present, add its value as an |
| 760 // IAccessible2 attribute with the name |ia2_attr|. | 766 // IAccessible2 attribute with the name |ia2_attr|. |
| 761 void BoolAttributeToIA2(ui::AXBoolAttribute attribute, | 767 void BoolAttributeToIA2(ui::AXBoolAttribute attribute, |
| 762 const char* ia2_attr); | 768 const char* ia2_attr); |
| 763 | 769 |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 897 // Give BrowserAccessibility::Create access to our constructor. | 903 // Give BrowserAccessibility::Create access to our constructor. |
| 898 friend class BrowserAccessibility; | 904 friend class BrowserAccessibility; |
| 899 friend class BrowserAccessibilityRelation; | 905 friend class BrowserAccessibilityRelation; |
| 900 | 906 |
| 901 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); | 907 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); |
| 902 }; | 908 }; |
| 903 | 909 |
| 904 } // namespace content | 910 } // namespace content |
| 905 | 911 |
| 906 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 912 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
| OLD | NEW |