| 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 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 783 BrowserAccessibilityWin* NewReference(); | 783 BrowserAccessibilityWin* NewReference(); |
| 784 | 784 |
| 785 // Many MSAA methods take a var_id parameter indicating that the operation | 785 // Many MSAA methods take a var_id parameter indicating that the operation |
| 786 // should be performed on a particular child ID, rather than this object. | 786 // should be performed on a particular child ID, rather than this object. |
| 787 // This method tries to figure out the target object from |var_id| and | 787 // This method tries to figure out the target object from |var_id| and |
| 788 // returns a pointer to the target object if it exists, otherwise NULL. | 788 // returns a pointer to the target object if it exists, otherwise NULL. |
| 789 // Does not return a new reference. | 789 // Does not return a new reference. |
| 790 BrowserAccessibilityWin* GetTargetFromChildID(const VARIANT& var_id); | 790 BrowserAccessibilityWin* GetTargetFromChildID(const VARIANT& var_id); |
| 791 | 791 |
| 792 // Initialize the role and state metadata from the role enum and state | 792 // Initialize the role and state metadata from the role enum and state |
| 793 // bitmasks defined in AccessibilityNodeData. | 793 // bitmasks defined in ui::AXNodeData. |
| 794 void InitRoleAndState(); | 794 void InitRoleAndState(); |
| 795 | 795 |
| 796 // Retrieve the value of an attribute from the string attribute map and | 796 // Retrieve the value of an attribute from the string attribute map and |
| 797 // if found and nonempty, allocate a new BSTR (with SysAllocString) | 797 // if found and nonempty, allocate a new BSTR (with SysAllocString) |
| 798 // and return S_OK. If not found or empty, return S_FALSE. | 798 // and return S_OK. If not found or empty, return S_FALSE. |
| 799 HRESULT GetStringAttributeAsBstr( | 799 HRESULT GetStringAttributeAsBstr( |
| 800 AccessibilityNodeData::StringAttribute attribute, | 800 ui::AXStringAttribute attribute, |
| 801 BSTR* value_bstr); | 801 BSTR* value_bstr); |
| 802 | 802 |
| 803 // If the string attribute |attribute| is present, add its value as an | 803 // If the string attribute |attribute| is present, add its value as an |
| 804 // IAccessible2 attribute with the name |ia2_attr|. | 804 // IAccessible2 attribute with the name |ia2_attr|. |
| 805 void StringAttributeToIA2(AccessibilityNodeData::StringAttribute attribute, | 805 void StringAttributeToIA2(ui::AXStringAttribute attribute, |
| 806 const char* ia2_attr); | 806 const char* ia2_attr); |
| 807 | 807 |
| 808 // If the bool attribute |attribute| is present, add its value as an | 808 // If the bool attribute |attribute| is present, add its value as an |
| 809 // IAccessible2 attribute with the name |ia2_attr|. | 809 // IAccessible2 attribute with the name |ia2_attr|. |
| 810 void BoolAttributeToIA2(AccessibilityNodeData::BoolAttribute attribute, | 810 void BoolAttributeToIA2(ui::AXBoolAttribute attribute, |
| 811 const char* ia2_attr); | 811 const char* ia2_attr); |
| 812 | 812 |
| 813 // If the int attribute |attribute| is present, add its value as an | 813 // If the int attribute |attribute| is present, add its value as an |
| 814 // IAccessible2 attribute with the name |ia2_attr|. | 814 // IAccessible2 attribute with the name |ia2_attr|. |
| 815 void IntAttributeToIA2(AccessibilityNodeData::IntAttribute attribute, | 815 void IntAttributeToIA2(ui::AXIntAttribute attribute, |
| 816 const char* ia2_attr); | 816 const char* ia2_attr); |
| 817 | 817 |
| 818 // Get the value text, which might come from the floating-point | 818 // Get the value text, which might come from the floating-point |
| 819 // value for some roles. | 819 // value for some roles. |
| 820 base::string16 GetValueText(); | 820 base::string16 GetValueText(); |
| 821 | 821 |
| 822 // Get the text of this node for the purposes of IAccessibleText - it may | 822 // Get the text of this node for the purposes of IAccessibleText - it may |
| 823 // be the name, it may be the value, etc. depending on the role. | 823 // be the name, it may be the value, etc. depending on the role. |
| 824 base::string16 TextForIAccessibleText(); | 824 base::string16 TextForIAccessibleText(); |
| 825 | 825 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 898 // Give BrowserAccessibility::Create access to our constructor. | 898 // Give BrowserAccessibility::Create access to our constructor. |
| 899 friend class BrowserAccessibility; | 899 friend class BrowserAccessibility; |
| 900 friend class BrowserAccessibilityRelation; | 900 friend class BrowserAccessibilityRelation; |
| 901 | 901 |
| 902 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); | 902 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityWin); |
| 903 }; | 903 }; |
| 904 | 904 |
| 905 } // namespace content | 905 } // namespace content |
| 906 | 906 |
| 907 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ | 907 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_WIN_H_ |
| OLD | NEW |