| 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 #include "content/browser/accessibility/browser_accessibility_win.h" | 5 #include "content/browser/accessibility/browser_accessibility_win.h" |
| 6 | 6 |
| 7 #include <UIAutomationClient.h> | 7 #include <UIAutomationClient.h> |
| 8 #include <UIAutomationCoreApi.h> | 8 #include <UIAutomationCoreApi.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 2740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2751 BSTR* style_values) { | 2751 BSTR* style_values) { |
| 2752 if (!instance_active()) | 2752 if (!instance_active()) |
| 2753 return E_FAIL; | 2753 return E_FAIL; |
| 2754 | 2754 |
| 2755 if (!style_properties || !style_values) | 2755 if (!style_properties || !style_values) |
| 2756 return E_INVALIDARG; | 2756 return E_INVALIDARG; |
| 2757 | 2757 |
| 2758 // We only cache a single style property for now: DISPLAY | 2758 // We only cache a single style property for now: DISPLAY |
| 2759 | 2759 |
| 2760 for (unsigned short i = 0; i < num_style_properties; ++i) { | 2760 for (unsigned short i = 0; i < num_style_properties; ++i) { |
| 2761 base::string16 name = (LPCWSTR)style_properties[i]; | 2761 base::string16 name = base::ToLowerASCII( |
| 2762 base::StringToLowerASCII(&name); | 2762 reinterpret_cast<const base::char16*>(style_properties[i])); |
| 2763 if (name == L"display") { | 2763 if (name == L"display") { |
| 2764 base::string16 display = GetString16Attribute( | 2764 base::string16 display = GetString16Attribute( |
| 2765 ui::AX_ATTR_DISPLAY); | 2765 ui::AX_ATTR_DISPLAY); |
| 2766 style_values[i] = SysAllocString(display.c_str()); | 2766 style_values[i] = SysAllocString(display.c_str()); |
| 2767 } else { | 2767 } else { |
| 2768 style_values[i] = NULL; | 2768 style_values[i] = NULL; |
| 2769 } | 2769 } |
| 2770 } | 2770 } |
| 2771 | 2771 |
| 2772 return S_OK; | 2772 return S_OK; |
| (...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4499 ia2_role = ia_role; | 4499 ia2_role = ia_role; |
| 4500 | 4500 |
| 4501 win_attributes_->ia_role = ia_role; | 4501 win_attributes_->ia_role = ia_role; |
| 4502 win_attributes_->ia_state = ia_state; | 4502 win_attributes_->ia_state = ia_state; |
| 4503 win_attributes_->role_name = role_name; | 4503 win_attributes_->role_name = role_name; |
| 4504 win_attributes_->ia2_role = ia2_role; | 4504 win_attributes_->ia2_role = ia2_role; |
| 4505 win_attributes_->ia2_state = ia2_state; | 4505 win_attributes_->ia2_state = ia2_state; |
| 4506 } | 4506 } |
| 4507 | 4507 |
| 4508 } // namespace content | 4508 } // namespace content |
| OLD | NEW |