| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 #include <string.h> | 8 #include <string.h> |
| 9 | 9 |
| 10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 static const gchar* browser_accessibility_get_name(AtkAction* atk_action, | 89 static const gchar* browser_accessibility_get_name(AtkAction* atk_action, |
| 90 gint index) { | 90 gint index) { |
| 91 g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0); | 91 g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0); |
| 92 g_return_val_if_fail(!index, 0); | 92 g_return_val_if_fail(!index, 0); |
| 93 BrowserAccessibilityAuraLinux* obj = | 93 BrowserAccessibilityAuraLinux* obj = |
| 94 ToBrowserAccessibilityAuraLinux(atk_action); | 94 ToBrowserAccessibilityAuraLinux(atk_action); |
| 95 if (!obj) | 95 if (!obj) |
| 96 return nullptr; | 96 return nullptr; |
| 97 | 97 |
| 98 int action; | 98 int action; |
| 99 if (!obj->GetIntAttribute(ui::AX_ATTR_ACTION, &action)) | 99 if (!obj->GetIntAttribute(ui::AX_ATTR_DEFAULT_ACTION_VERB, &action)) |
| 100 return nullptr; | 100 return nullptr; |
| 101 base::string16 action_verb = | 101 base::string16 action_verb = ui::ActionVerbToUnlocalizedString( |
| 102 ui::ActionToUnlocalizedString(static_cast<ui::AXSupportedAction>(action)); | 102 static_cast<ui::AXDefaultActionVerb>(action)); |
| 103 return base::UTF16ToUTF8(action_verb).c_str(); | 103 return base::UTF16ToUTF8(action_verb).c_str(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 static const gchar* browser_accessibility_get_keybinding(AtkAction* atk_action, | 106 static const gchar* browser_accessibility_get_keybinding(AtkAction* atk_action, |
| 107 gint index) { | 107 gint index) { |
| 108 g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0); | 108 g_return_val_if_fail(ATK_IS_ACTION(atk_action), 0); |
| 109 g_return_val_if_fail(!index, 0); | 109 g_return_val_if_fail(!index, 0); |
| 110 BrowserAccessibilityAuraLinux* obj = | 110 BrowserAccessibilityAuraLinux* obj = |
| 111 ToBrowserAccessibilityAuraLinux(atk_action); | 111 ToBrowserAccessibilityAuraLinux(atk_action); |
| 112 if (!obj) | 112 if (!obj) |
| (...skipping 855 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 968 atk_role_ = ATK_ROLE_SECTION; | 968 atk_role_ = ATK_ROLE_SECTION; |
| 969 #endif | 969 #endif |
| 970 break; | 970 break; |
| 971 default: | 971 default: |
| 972 atk_role_ = ATK_ROLE_UNKNOWN; | 972 atk_role_ = ATK_ROLE_UNKNOWN; |
| 973 break; | 973 break; |
| 974 } | 974 } |
| 975 } | 975 } |
| 976 | 976 |
| 977 } // namespace content | 977 } // namespace content |
| OLD | NEW |