| 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.h" | 5 #include "content/browser/accessibility/browser_accessibility.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <iterator> | 10 #include <iterator> |
| (...skipping 874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 if (GetIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN, &row_span)) | 885 if (GetIntAttribute(ui::AX_ATTR_TABLE_CELL_ROW_SPAN, &row_span)) |
| 886 return row_span; | 886 return row_span; |
| 887 return 1; | 887 return 1; |
| 888 } | 888 } |
| 889 | 889 |
| 890 base::string16 BrowserAccessibility::GetText() const { | 890 base::string16 BrowserAccessibility::GetText() const { |
| 891 return GetInnerText(); | 891 return GetInnerText(); |
| 892 } | 892 } |
| 893 | 893 |
| 894 bool BrowserAccessibility::HasState(ui::AXState state_enum) const { | 894 bool BrowserAccessibility::HasState(ui::AXState state_enum) const { |
| 895 return (GetState() >> state_enum) & 1; | 895 return GetData().HasState(state_enum); |
| 896 } | 896 } |
| 897 | 897 |
| 898 bool BrowserAccessibility::IsCellOrTableHeaderRole() const { | 898 bool BrowserAccessibility::IsCellOrTableHeaderRole() const { |
| 899 return (GetRole() == ui::AX_ROLE_CELL || | 899 return (GetRole() == ui::AX_ROLE_CELL || |
| 900 GetRole() == ui::AX_ROLE_COLUMN_HEADER || | 900 GetRole() == ui::AX_ROLE_COLUMN_HEADER || |
| 901 GetRole() == ui::AX_ROLE_ROW_HEADER); | 901 GetRole() == ui::AX_ROLE_ROW_HEADER); |
| 902 } | 902 } |
| 903 | 903 |
| 904 bool BrowserAccessibility::IsTableLikeRole() const { | 904 bool BrowserAccessibility::IsTableLikeRole() const { |
| 905 return (GetRole() == ui::AX_ROLE_TABLE || | 905 return (GetRole() == ui::AX_ROLE_TABLE || |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 return gfx::kNullAcceleratedWidget; | 1194 return gfx::kNullAcceleratedWidget; |
| 1195 } | 1195 } |
| 1196 | 1196 |
| 1197 bool BrowserAccessibility::AccessibilityPerformAction( | 1197 bool BrowserAccessibility::AccessibilityPerformAction( |
| 1198 const ui::AXActionData& data) { | 1198 const ui::AXActionData& data) { |
| 1199 NOTREACHED(); | 1199 NOTREACHED(); |
| 1200 return false; | 1200 return false; |
| 1201 } | 1201 } |
| 1202 | 1202 |
| 1203 } // namespace content | 1203 } // namespace content |
| OLD | NEW |