| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/accessibility/browser_accessibility_win.h" | 5 #include "chrome/browser/accessibility/browser_accessibility_win.h" |
| 6 | 6 |
| 7 #include "base/string_number_conversions.h" | 7 #include "base/string_number_conversions.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/accessibility/browser_accessibility_manager_win.h" | 10 #include "chrome/browser/accessibility/browser_accessibility_manager_win.h" |
| (...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 | 1186 |
| 1187 if (str.empty()) | 1187 if (str.empty()) |
| 1188 return S_FALSE; | 1188 return S_FALSE; |
| 1189 | 1189 |
| 1190 *value_bstr = SysAllocString(str.c_str()); | 1190 *value_bstr = SysAllocString(str.c_str()); |
| 1191 DCHECK(*value_bstr); | 1191 DCHECK(*value_bstr); |
| 1192 | 1192 |
| 1193 return S_OK; | 1193 return S_OK; |
| 1194 } | 1194 } |
| 1195 | 1195 |
| 1196 string16 BrowserAccessibilityWin::Escape(string16 str) { | 1196 string16 BrowserAccessibilityWin::Escape(const string16& str) { |
| 1197 return EscapeQueryParamValueUTF8(str, false); | 1197 return EscapeQueryParamValueUTF8(str, false); |
| 1198 } | 1198 } |
| 1199 | 1199 |
| 1200 const string16& BrowserAccessibilityWin::TextForIAccessibleText() { | 1200 const string16& BrowserAccessibilityWin::TextForIAccessibleText() { |
| 1201 if (role_ == WebAccessibility::ROLE_TEXT_FIELD) { | 1201 if (role_ == WebAccessibility::ROLE_TEXT_FIELD) { |
| 1202 return value_; | 1202 return value_; |
| 1203 } else { | 1203 } else { |
| 1204 return name_; | 1204 return name_; |
| 1205 } | 1205 } |
| 1206 } | 1206 } |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1585 } | 1585 } |
| 1586 | 1586 |
| 1587 // The role should always be set. | 1587 // The role should always be set. |
| 1588 DCHECK(!role_name_.empty() || ia_role_); | 1588 DCHECK(!role_name_.empty() || ia_role_); |
| 1589 | 1589 |
| 1590 // If we didn't explicitly set the IAccessible2 role, make it the same | 1590 // If we didn't explicitly set the IAccessible2 role, make it the same |
| 1591 // as the MSAA role. | 1591 // as the MSAA role. |
| 1592 if (!ia2_role_) | 1592 if (!ia2_role_) |
| 1593 ia2_role_ = ia_role_; | 1593 ia2_role_ = ia_role_; |
| 1594 } | 1594 } |
| OLD | NEW |