| 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" |
| 11 #include "base/task_runner.h" | 11 #include "base/task_runner.h" |
| 12 #include "ui/accessibility/ax_node_data.h" | 12 #include "ui/accessibility/ax_node_data.h" |
| 13 #include "ui/accessibility/platform/atk_util_auralinux.h" | 13 #include "ui/accessibility/platform/atk_util_auralinux.h" |
| 14 #include "ui/accessibility/platform/ax_platform_node_delegate.h" | 14 #include "ui/accessibility/platform/ax_platform_node_delegate.h" |
| 15 #include "ui/gfx/geometry/rect_conversions.h" |
| 15 | 16 |
| 16 // | 17 // |
| 17 // ax_platform_node_auralinux AtkObject definition and implementation. | 18 // ax_platform_node_auralinux AtkObject definition and implementation. |
| 18 // | 19 // |
| 19 | 20 |
| 20 G_BEGIN_DECLS | 21 G_BEGIN_DECLS |
| 21 | 22 |
| 22 #define AX_PLATFORM_NODE_AURALINUX_TYPE (ax_platform_node_auralinux_get_type()) | 23 #define AX_PLATFORM_NODE_AURALINUX_TYPE (ax_platform_node_auralinux_get_type()) |
| 23 #define AX_PLATFORM_NODE_AURALINUX(obj) \ | 24 #define AX_PLATFORM_NODE_AURALINUX(obj) \ |
| 24 (G_TYPE_CHECK_INSTANCE_CAST( \ | 25 (G_TYPE_CHECK_INSTANCE_CAST( \ |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 } | 522 } |
| 522 | 523 |
| 523 void AXPlatformNodeAuraLinux::GetPosition(gint* x, gint* y, | 524 void AXPlatformNodeAuraLinux::GetPosition(gint* x, gint* y, |
| 524 AtkCoordType coord_type) { | 525 AtkCoordType coord_type) { |
| 525 SetExtentsRelativeToAtkCoordinateType(x, y, | 526 SetExtentsRelativeToAtkCoordinateType(x, y, |
| 526 nullptr,nullptr, | 527 nullptr,nullptr, |
| 527 coord_type); | 528 coord_type); |
| 528 } | 529 } |
| 529 | 530 |
| 530 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { | 531 void AXPlatformNodeAuraLinux::GetSize(gint* width, gint* height) { |
| 531 gfx::Rect rect_size = GetData().location; | 532 gfx::Rect rect_size = gfx::ToEnclosingRect(GetData().location); |
| 532 if (width) | 533 if (width) |
| 533 *width = rect_size.width(); | 534 *width = rect_size.width(); |
| 534 if (height) | 535 if (height) |
| 535 *height = rect_size.height(); | 536 *height = rect_size.height(); |
| 536 } | 537 } |
| 537 | 538 |
| 538 } // namespace ui | 539 } // namespace ui |
| OLD | NEW |