| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "ui/accessibility/platform/ax_platform_node_auralinux.h" | 5 #include "ui/accessibility/platform/ax_platform_node_auralinux.h" |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/strings/sys_string_conversions.h" | 8 #include "base/strings/sys_string_conversions.h" |
| 9 #include "ui/accessibility/ax_node_data.h" | 9 #include "ui/accessibility/ax_node_data.h" |
| 10 #include "ui/accessibility/platform/atk_util_auralinux.h" | 10 #include "ui/accessibility/platform/atk_util_auralinux.h" |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 AXPlatformNode* AXPlatformNodeAuraLinux::application_ = nullptr; | 224 AXPlatformNode* AXPlatformNodeAuraLinux::application_ = nullptr; |
| 225 | 225 |
| 226 // static | 226 // static |
| 227 void AXPlatformNodeAuraLinux::SetApplication(AXPlatformNode* application) { | 227 void AXPlatformNodeAuraLinux::SetApplication(AXPlatformNode* application) { |
| 228 application_ = application; | 228 application_ = application; |
| 229 AtkUtilAuraLinux::GetInstance(); | 229 AtkUtilAuraLinux::GetInstance(); |
| 230 } | 230 } |
| 231 | 231 |
| 232 AtkRole AXPlatformNodeAuraLinux::GetAtkRole() { | 232 AtkRole AXPlatformNodeAuraLinux::GetAtkRole() { |
| 233 switch (GetData().role) { | 233 switch (GetData().role) { |
| 234 case ui::AX_ROLE_ALERT: |
| 235 return ATK_ROLE_ALERT; |
| 234 case ui::AX_ROLE_APPLICATION: | 236 case ui::AX_ROLE_APPLICATION: |
| 235 return ATK_ROLE_APPLICATION; | 237 return ATK_ROLE_APPLICATION; |
| 236 case ui::AX_ROLE_BUTTON: | 238 case ui::AX_ROLE_BUTTON: |
| 237 return ATK_ROLE_PUSH_BUTTON; | 239 return ATK_ROLE_PUSH_BUTTON; |
| 238 case ui::AX_ROLE_CHECK_BOX: | 240 case ui::AX_ROLE_CHECK_BOX: |
| 239 return ATK_ROLE_CHECK_BOX; | 241 return ATK_ROLE_CHECK_BOX; |
| 240 case ui::AX_ROLE_COMBO_BOX: | 242 case ui::AX_ROLE_COMBO_BOX: |
| 241 return ATK_ROLE_COMBO_BOX; | 243 return ATK_ROLE_COMBO_BOX; |
| 244 case ui::AX_ROLE_GROUP: |
| 245 return ATK_ROLE_PANEL; |
| 246 case ui::AX_ROLE_MENU_ITEM: |
| 247 return ATK_ROLE_MENU_ITEM; |
| 248 case ui::AX_ROLE_SPLITTER: |
| 249 return ATK_ROLE_SEPARATOR; |
| 242 case ui::AX_ROLE_STATIC_TEXT: | 250 case ui::AX_ROLE_STATIC_TEXT: |
| 243 return ATK_ROLE_TEXT; | 251 return ATK_ROLE_TEXT; |
| 252 case ui::AX_ROLE_TAB: |
| 253 return ATK_ROLE_PAGE_TAB; |
| 254 case ui::AX_ROLE_TAB_LIST: |
| 255 return ATK_ROLE_PAGE_TAB_LIST; |
| 244 case ui::AX_ROLE_TEXT_FIELD: | 256 case ui::AX_ROLE_TEXT_FIELD: |
| 245 return ATK_ROLE_ENTRY; | 257 return ATK_ROLE_ENTRY; |
| 258 case ui::AX_ROLE_TOOLBAR: |
| 259 return ATK_ROLE_TOOL_BAR; |
| 246 case ui::AX_ROLE_WINDOW: | 260 case ui::AX_ROLE_WINDOW: |
| 247 return ATK_ROLE_WINDOW; | 261 return ATK_ROLE_WINDOW; |
| 248 default: | 262 default: |
| 249 return ATK_ROLE_UNKNOWN; | 263 return ATK_ROLE_UNKNOWN; |
| 250 } | 264 } |
| 251 } | 265 } |
| 252 | 266 |
| 253 AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() | 267 AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() |
| 254 : atk_object_(nullptr) { | 268 : atk_object_(nullptr) { |
| 255 } | 269 } |
| (...skipping 18 matching lines...) Expand all Loading... |
| 274 } | 288 } |
| 275 | 289 |
| 276 void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(ui::AXEvent event_type) { | 290 void AXPlatformNodeAuraLinux::NotifyAccessibilityEvent(ui::AXEvent event_type) { |
| 277 } | 291 } |
| 278 | 292 |
| 279 int AXPlatformNodeAuraLinux::GetIndexInParent() { | 293 int AXPlatformNodeAuraLinux::GetIndexInParent() { |
| 280 return 0; | 294 return 0; |
| 281 } | 295 } |
| 282 | 296 |
| 283 } // namespace ui | 297 } // namespace ui |
| OLD | NEW |