| 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 "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
| (...skipping 2546 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2557 if (!instance_active()) | 2557 if (!instance_active()) |
| 2558 return E_FAIL; | 2558 return E_FAIL; |
| 2559 | 2559 |
| 2560 if (!style_properties || !style_values) | 2560 if (!style_properties || !style_values) |
| 2561 return E_INVALIDARG; | 2561 return E_INVALIDARG; |
| 2562 | 2562 |
| 2563 // We only cache a single style property for now: DISPLAY | 2563 // We only cache a single style property for now: DISPLAY |
| 2564 | 2564 |
| 2565 for (unsigned short i = 0; i < num_style_properties; ++i) { | 2565 for (unsigned short i = 0; i < num_style_properties; ++i) { |
| 2566 base::string16 name = (LPCWSTR)style_properties[i]; | 2566 base::string16 name = (LPCWSTR)style_properties[i]; |
| 2567 StringToLowerASCII(&name); | 2567 base::StringToLowerASCII(&name); |
| 2568 if (name == L"display") { | 2568 if (name == L"display") { |
| 2569 base::string16 display = GetString16Attribute( | 2569 base::string16 display = GetString16Attribute( |
| 2570 ui::AX_ATTR_DISPLAY); | 2570 ui::AX_ATTR_DISPLAY); |
| 2571 style_values[i] = SysAllocString(display.c_str()); | 2571 style_values[i] = SysAllocString(display.c_str()); |
| 2572 } else { | 2572 } else { |
| 2573 style_values[i] = NULL; | 2573 style_values[i] = NULL; |
| 2574 } | 2574 } |
| 2575 } | 2575 } |
| 2576 | 2576 |
| 2577 return S_OK; | 2577 return S_OK; |
| (...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3793 // The role should always be set. | 3793 // The role should always be set. |
| 3794 DCHECK(!role_name_.empty() || ia_role_); | 3794 DCHECK(!role_name_.empty() || ia_role_); |
| 3795 | 3795 |
| 3796 // If we didn't explicitly set the IAccessible2 role, make it the same | 3796 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 3797 // as the MSAA role. | 3797 // as the MSAA role. |
| 3798 if (!ia2_role_) | 3798 if (!ia2_role_) |
| 3799 ia2_role_ = ia_role_; | 3799 ia2_role_ = ia_role_; |
| 3800 } | 3800 } |
| 3801 | 3801 |
| 3802 } // namespace content | 3802 } // namespace content |
| OLD | NEW |