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> |
| 8 |
7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
8 #include "base/strings/sys_string_conversions.h" | 10 #include "base/strings/sys_string_conversions.h" |
9 #include "base/task_runner.h" | 11 #include "base/task_runner.h" |
10 #include "ui/accessibility/ax_node_data.h" | 12 #include "ui/accessibility/ax_node_data.h" |
11 #include "ui/accessibility/platform/atk_util_auralinux.h" | 13 #include "ui/accessibility/platform/atk_util_auralinux.h" |
12 #include "ui/accessibility/platform/ax_platform_node_delegate.h" | 14 #include "ui/accessibility/platform/ax_platform_node_delegate.h" |
13 | 15 |
14 // | 16 // |
15 // ax_platform_node_auralinux AtkObject definition and implementation. | 17 // ax_platform_node_auralinux AtkObject definition and implementation. |
16 // | 18 // |
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 case ui::AX_ROLE_TOOLBAR: | 427 case ui::AX_ROLE_TOOLBAR: |
426 return ATK_ROLE_TOOL_BAR; | 428 return ATK_ROLE_TOOL_BAR; |
427 case ui::AX_ROLE_WINDOW: | 429 case ui::AX_ROLE_WINDOW: |
428 return ATK_ROLE_WINDOW; | 430 return ATK_ROLE_WINDOW; |
429 default: | 431 default: |
430 return ATK_ROLE_UNKNOWN; | 432 return ATK_ROLE_UNKNOWN; |
431 } | 433 } |
432 } | 434 } |
433 | 435 |
434 void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) { | 436 void AXPlatformNodeAuraLinux::GetAtkState(AtkStateSet* atk_state_set) { |
435 uint32 state = GetData().state; | 437 uint32_t state = GetData().state; |
436 | 438 |
437 if (state & (1 << ui::AX_STATE_CHECKED)) | 439 if (state & (1 << ui::AX_STATE_CHECKED)) |
438 atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED); | 440 atk_state_set_add_state(atk_state_set, ATK_STATE_CHECKED); |
439 if (state & (1 << ui::AX_STATE_DEFAULT)) | 441 if (state & (1 << ui::AX_STATE_DEFAULT)) |
440 atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT); | 442 atk_state_set_add_state(atk_state_set, ATK_STATE_DEFAULT); |
441 if (state & (1 << ui::AX_STATE_EDITABLE)) | 443 if (state & (1 << ui::AX_STATE_EDITABLE)) |
442 atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE); | 444 atk_state_set_add_state(atk_state_set, ATK_STATE_EDITABLE); |
443 if (state & (1 << ui::AX_STATE_ENABLED)) | 445 if (state & (1 << ui::AX_STATE_ENABLED)) |
444 atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED); | 446 atk_state_set_add_state(atk_state_set, ATK_STATE_ENABLED); |
445 if (state & (1 << ui::AX_STATE_EXPANDED)) | 447 if (state & (1 << ui::AX_STATE_EXPANDED)) |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 | 533 |
532 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { | 534 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { |
533 gfx::Rect rect_size = GetData().location; | 535 gfx::Rect rect_size = GetData().location; |
534 if (width) | 536 if (width) |
535 *width = rect_size.width(); | 537 *width = rect_size.width(); |
536 if (height) | 538 if (height) |
537 *height = rect_size.height(); | 539 *height = rect_size.height(); |
538 } | 540 } |
539 | 541 |
540 } // namespace ui | 542 } // namespace ui |
OLD | NEW |