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 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
435 | 435 |
436 void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) { | 436 void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) { |
437 uint32_t state = GetData().state; | 437 uint32_t state = GetData().state; |
438 | 438 |
439 if (state & (1 << ui::AX_STATE_CHECKED)) | 439 if (state & (1 << ui::AX_STATE_CHECKED)) |
440 atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED); | 440 atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED); |
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_DISABLED))) |
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_PRESSED)) | 451 if (state & (1 << ui::AX_STATE_PRESSED)) |
452 atk_state_set_add_state(atk_state_set, ATK_STATE_PRESSED); | 452 atk_state_set_add_state(atk_state_set, ATK_STATE_PRESSED); |
453 if (state & (1 << ui::AX_STATE_SELECTABLE)) | 453 if (state & (1 << ui::AX_STATE_SELECTABLE)) |
454 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE); | 454 atk_state_set_add_state(atk_state_set, ATK_STATE_SELECTABLE); |
455 if (state & (1 << ui::AX_STATE_SELECTED)) | 455 if (state & (1 << ui::AX_STATE_SELECTED)) |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
529 | 529 |
530 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { | 530 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { |
531 gfx::Rect rect_size = GetData().location; | 531 gfx::Rect rect_size = GetData().location; |
532 if (width) | 532 if (width) |
533 *width = rect_size.width(); | 533 *width = rect_size.width(); |
534 if (height) | 534 if (height) |
535 *height = rect_size.height(); | 535 *height = rect_size.height(); |
536 } | 536 } |
537 | 537 |
538 } // namespace ui | 538 } // namespace ui |
OLD | NEW |