| 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 <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
| (...skipping 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 if (state & (1 << ui::AX_STATE_DEFAULT)) | 441 if (state & (1 << ui::AX_STATE_DEFAULT)) |
| 442 atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT); | 442 atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT); |
| 443 if (state & (1 << ui::AX_STATE_EDITABLE)) | 443 if (state & (1 << ui::AX_STATE_EDITABLE)) |
| 444 atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE); | 444 atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE); |
| 445 if (state & (1 << ui::AX_STATE_ENABLED)) | 445 if (state & (1 << ui::AX_STATE_ENABLED)) |
| 446 atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED); | 446 atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED); |
| 447 if (state & (1 << ui::AX_STATE_EXPANDED)) | 447 if (state & (1 << ui::AX_STATE_EXPANDED)) |
| 448 atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED); | 448 atk_state_set_add_state(atk_state_set, ATK_STATE_EXPANDED); |
| 449 if (state & (1 << ui::AX_STATE_FOCUSABLE)) | 449 if (state & (1 << ui::AX_STATE_FOCUSABLE)) |
| 450 atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE); | 450 atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSABLE); |
| 451 if (state & (1 << ui::AX_STATE_FOCUSED)) | |
| 452 atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSED); | |
| 453 if (state & (1 << ui::AX_STATE_PRESSED)) | 451 if (state & (1 << ui::AX_STATE_PRESSED)) |
| 454 atk_state_set_add_state(atk_state_set, ATK_STATE_PRESSED); | 452 atk_state_set_add_state(atk_state_set, ATK_STATE_PRESSED); |
| 455 if (state & (1 << ui::AX_STATE_SELECTABLE)) | 453 if (state & (1 << ui::AX_STATE_SELECTABLE)) |
| 456 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE); | 454 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE); |
| 457 if (state & (1 << ui::AX_STATE_SELECTED)) | 455 if (state & (1 << ui::AX_STATE_SELECTED)) |
| 458 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED); | 456 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTED); |
| 457 |
| 458 if (delegate_->GetFocus() == GetNativeViewAccessible()) |
| 459 atk_state_set_add_state(atk_state_set, ATK_STATE_FOCUSED); |
| 459 } | 460 } |
| 460 | 461 |
| 461 void AXPlatformNodeAuraLinux::GetAtkRelations(AtkRelationSet* atk_relation_set) | 462 void AXPlatformNodeAuraLinux::GetAtkRelations(AtkRelationSet* atk_relation_set) |
| 462 { | 463 { |
| 463 } | 464 } |
| 464 | 465 |
| 465 AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() | 466 AXPlatformNodeAuraLinux::AXPlatformNodeAuraLinux() |
| 466 : atk_object_(nullptr) { | 467 : atk_object_(nullptr) { |
| 467 } | 468 } |
| 468 | 469 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 534 |
| 534 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { | 535 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { |
| 535 gfx::Rect rect_size = GetData().location; | 536 gfx::Rect rect_size = GetData().location; |
| 536 if (width) | 537 if (width) |
| 537 *width = rect_size.width(); | 538 *width = rect_size.width(); |
| 538 if (height) | 539 if (height) |
| 539 *height = rect_size.height(); | 540 *height = rect_size.height(); |
| 540 } | 541 } |
| 541 | 542 |
| 542 } // namespace ui | 543 } // namespace ui |
| OLD | NEW |