OLD | NEW |
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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_auralinux.h" | 5 #include "content/browser/accessibility/browser_accessibility_auralinux.h" |
6 | 6 |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "content/browser/accessibility/browser_accessibility_manager_auralinux.
h" | 8 #include "content/browser/accessibility/browser_accessibility_manager_auralinux.
h" |
9 #include "content/common/accessibility_messages.h" | 9 #include "content/common/accessibility_messages.h" |
10 | 10 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
198 if (!IS_BROWSER_ACCESSIBILITY(atk_doc)) | 198 if (!IS_BROWSER_ACCESSIBILITY(atk_doc)) |
199 return NULL; | 199 return NULL; |
200 | 200 |
201 return ToBrowserAccessibilityAuraLinux(BROWSER_ACCESSIBILITY(atk_doc)); | 201 return ToBrowserAccessibilityAuraLinux(BROWSER_ACCESSIBILITY(atk_doc)); |
202 } | 202 } |
203 | 203 |
204 static const gchar* GetDocumentAttributeValue( | 204 static const gchar* GetDocumentAttributeValue( |
205 BrowserAccessibilityAuraLinux* obj, | 205 BrowserAccessibilityAuraLinux* obj, |
206 const gchar* attribute) { | 206 const gchar* attribute) { |
207 if (!g_ascii_strcasecmp(attribute, "DocType")) | 207 if (!g_ascii_strcasecmp(attribute, "DocType")) |
208 return obj->GetStringAttribute(ui::AX_ATTR_DOC_DOCTYPE).c_str(); | 208 return obj->manager()->GetTreeData().doctype.c_str(); |
209 else if (!g_ascii_strcasecmp(attribute, "MimeType")) | 209 else if (!g_ascii_strcasecmp(attribute, "MimeType")) |
210 return obj->GetStringAttribute(ui::AX_ATTR_DOC_MIMETYPE).c_str(); | 210 return obj->manager()->GetTreeData().mimetype.c_str(); |
211 else if (!g_ascii_strcasecmp(attribute, "Title")) | 211 else if (!g_ascii_strcasecmp(attribute, "Title")) |
212 return obj->GetStringAttribute(ui::AX_ATTR_DOC_TITLE).c_str(); | 212 return obj->manager()->GetTreeData().title.c_str(); |
213 else if (!g_ascii_strcasecmp(attribute, "URI")) | 213 else if (!g_ascii_strcasecmp(attribute, "URI")) |
214 return obj->GetStringAttribute(ui::AX_ATTR_DOC_URL).c_str(); | 214 return obj->manager()->GetTreeData().url.c_str(); |
215 | 215 |
216 return 0; | 216 return 0; |
217 } | 217 } |
218 | 218 |
219 AtkAttributeSet* SetAtkAttributeSet(AtkAttributeSet* attribute_set, | 219 AtkAttributeSet* SetAtkAttributeSet(AtkAttributeSet* attribute_set, |
220 const char* name, | 220 const char* name, |
221 const char* value) { | 221 const char* value) { |
222 AtkAttribute* attribute = | 222 AtkAttribute* attribute = |
223 static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute))); | 223 static_cast<AtkAttribute*>(g_malloc(sizeof(AtkAttribute))); |
224 attribute->name = g_strdup(name); | 224 attribute->name = g_strdup(name); |
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 case ui::AX_ROLE_TREE_ITEM: | 922 case ui::AX_ROLE_TREE_ITEM: |
923 atk_role_ = ATK_ROLE_TREE_ITEM; | 923 atk_role_ = ATK_ROLE_TREE_ITEM; |
924 break; | 924 break; |
925 default: | 925 default: |
926 atk_role_ = ATK_ROLE_UNKNOWN; | 926 atk_role_ = ATK_ROLE_UNKNOWN; |
927 break; | 927 break; |
928 } | 928 } |
929 } | 929 } |
930 | 930 |
931 } // namespace content | 931 } // namespace content |
OLD | NEW |